Problem/Motivation
The module is working fine with the default drupal core version.On the upgradation of the jquery version to above 1.9 using jquery_update module.It displayed the error and the module stops working, because jquery.live has been removed from jquery 1.9 and it has been replaced with jquery.On
Attached is the patch that work jquery update module.
Original Reported by @doidd
I have problem with Syntaxhighlighter Insert. Syntaxhighlighter Insert don't work with live() js function ( i use jquery 1.10). When i open Chrome developer tools , i see error "Uncaught TypeError: undefined is not a function" in file syntaxhighlighter_insert.js because not have class .syntaxhighlighter-insert-text-description-link and .syntaxhighlighter-insert-wysiwyg-description-link. So i replace live() js function with on(). It work fine for me. I hope you update for next version. Thank you! Sorry my english not good.
Proposed resolution
- Patch Attached.
- Can we specify on the project page about the module issue with jquery update module ?
Remaining tasks
Needs Maintainers eyes
User interface changes
None
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2245595-3-js-live-replace-on.patch | 711 bytes | saki007ster |
| work fine.png | 28.41 KB | doidd | |
| undefined function.png | 45.29 KB | doidd | |
| not-class.png | 75.73 KB | doidd |
Comments
Comment #1
doidd commentedComment #2
sri20198 commentedSubscribe.
After enabling jQuery Update module, the Syntaxhighlighter Insert throws error and does not work.
Temporarily fixed it using a custom JS function to override:
Hope it gets fixed ASAP.
Comment #3
saki007sterPatch attached that works with jquery > 1.9
Comment #4
baher commentedHi,
The solution is to replace the Jquery live function on line 36 of the file syntaxhighlighter_insert.js which is depredated since jquery 1.9.
So replace this line :
by this one :
jQuery('.syntaxhighlighter-insert-text-description-link, .syntaxhighlighter-insert-wysiwyg-description-link').on('click', function() {Baher
Comment #5
avpaderno