Did the plugin stop working in jQuery 1.9?

Plugin jQuery DropKick 1.0.0, console errors:

Uncaught TypeError: Cannot read property 'msie' of undefined 
Uncaught TypeError: Object [object Object] has no method 'dropkick'

You can still fix them somehow (judging by the issues on github), but it still won't work, what can I do?

PS this plugin makes drop-down lists more or less beautiful.

Jsfiddle test: dropkick ( the default version is 1.9 (not working), try 1.8 and get a nice list ).

Of. page: http://jamielottering.github.com/DropKick/

I don't want to reduce the jQuery version on the site. I myself have already tried and live to on change everywhere and $.browser to ie redo, but it did not work.

Here is the source of my edits.

Обновил source code with amendments (the plugin worked visually, but not functionally.)

Author: Smash, 2013-02-02

3 answers

What you need to change in the plugin code:

1) Change:

// Help prevent flashes of unstyled content if ($.browser.msie && $.browser.version.substr(0, 1)

To

Document.documentElement.className = document.documentElement.className + ' dk_fouc';

2) In line 343, change the live method to on
3) In line 358, change
$('.dk_options a').live(($.browser.msie ? 'mousedown' : 'click'), function (e) {
on
$('.dk_options a').on('click', function (e) {

 3
Author: Гена Царинный, 2013-02-02 21:39:12

Https://github.com/jquery/jquery-migrate/ This should help. even if here http://jsfiddle.net/Stasonix/h5N9c/ Side select "migrate" everything will work

 1
Author: Zeloras, 2013-06-22 04:03:07

$.browser has been removed from jQuery since version 1.9. It is now available separately as a plugin - https://github.com/gabceb/jquery-browser-plugin

 0
Author: Luntegg, 2015-07-27 09:12:47