Rasel Ahmed
Rasel Ahmed

Reputation: 305

jQuery plugin is working with old version not with new version

I was used this plugin for news tickr. Link: http://www.jquerynewsticker.com/

This plugin is working great with jQuery 1.6. But, not working with latest jQuery. How can I make this working with Latest jQuery?

You can find the plugin documentation on that site. Anyone can help?

Upvotes: 0

Views: 1365

Answers (2)

PSL
PSL

Reputation: 123739

Yes, it seems like it is using live which is deprecated and removed in the newer versions. But you can use jquery migrate for backward compatibility or for a quick fix just try adding this:

$.fn.live = $.fn.on;

Before calling the plugin function. Though this wont have support for dynamic elements as live does due to the syntax change in event delegation in on. But this will get going for static content.

Here is a fiddle that works with 2.x version of jquery.

Demo

Upvotes: 2

JasCav
JasCav

Reputation: 34632

If you're going from jQuery 1.6 to jQuery 2.x...that's a huge jump. Ensure that the plug-in even offers support for 2.x. If not, you can either use jQuery 1.x latest (which still has all the features of 2.x for now), or, use jQuery migrate to help transition between the versions. (jQuery migrate provides support for backwards compatibility.)

Upvotes: 1

Related Questions