Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jScrollPane and jQuery 1.8.0

After update to jQuery 1.8.0, jScrollPane gives me this error:

Uncaught Error: Syntax error, unrecognized expression: [type=text/javascript],not([type])

in this line:

$("script",elem).filter('[type=text/javascript],not([type])').remove();

Can anyone help?

Thanks

like image 594
rgomesf Avatar asked Aug 10 '12 14:08

rgomesf


2 Answers

  1. not is a pseudo selector and should be preceded by a : used as :not()
  2. While filtering by attribute name-value use as selector[attr="value"] - [type="text/javascript"].

So it should be -

.filter('[type="text/javascript"],:not([type])')
like image 52
Robin Maben Avatar answered Sep 28 '22 09:09

Robin Maben


Here is a patch for jScrollPane. Works fine with jquery 1.8.x https://github.com/jarednorman/jScrollPane/commit/2ef4821afa1dd62db056e3dea737e6f84b17fb13

This is a final minified version: https://raw.github.com/jarednorman/jScrollPane/2ef4821afa1dd62db056e3dea737e6f84b17fb13/script/jquery.jscrollpane.min.js

like image 40
King Julien Avatar answered Sep 28 '22 10:09

King Julien