4 ms·
For anyone making a shift from 1.7/1.8 to this, please don't overlook the jquery-migrate plugin (https://github.com/jquery/jquery-migrate/ https://github.com/jq
by ecaron 14y ago
For anyone making a shift from 1.7/1.8 to this, please don't overlook the jquery-migrate plugin (https://github.com/jquery/jquery-migrate/ https://github.com/jquery/jquery-migrate/).
You/we don't have to suffer the headaches of "what the heck changed since the version I was using...", the jQuery overlords have really done us a great service in offering this cool migration checker - so let's use it!
- zalew 14y agothat's what I got when using jquery migrate http://i.imgur.com/nviTD.png http://i.imgur.com/nviTD.png not that helpful, or am I missing something?
- mattparlane 14y agoThose are warnings to let you know that you are using deprecated functionality. Everything should still work, but you'll want to switch to the updated versions soon. Instead of $.browser, use $.support, and instead of .live(), use .on().
- zalew 14y agoI get it, but I thought it would map the occurences in my code, not just list the functions.
- mattparlane 14y agoAh, gotcha. If you have the console open at the time when the warning is triggered, you should be able to get a backtrace by clicking on the arrow beside the warning -- that will show you whereabouts in the code the problem is. At least that's how it works in Chrome, I think Firefox does the same.
- zalew 14y agono arrow in ff (firebug 1.11.1) nor in chromium (firebug lite).
- joshschreuder 14y agozalew, try out the Chrome dev tools (hit CTRL-SHIFT-I)
- dmethvin 14y ago* Click on the hyperlink for the line where the message was generated. * Set a breakpoint. * Refresh the page. * View the stack trace(s). Adding stack traces to the plugin itself would be difficult, since that's not standardized functionality and it would add quite a bit of bulk to the plugin.
- didip 14y agoSo, how does one use jquery-migrate? Include the script tag and... Will it show me which method (in which file) to replace in console?
- morphir 14y agohttps://github.com/jquery/jquery-migrate/#readme https://github.com/jquery/jquery-migrate/#readme