I have a jquery plugin that is working on all browsers, except opera. The removeHighlight function gets triggered, but the html is not changed. As far as I can see IE, FF, Chrome and Safari work as expected.
My example can be found here:
http://www.pritaeas.net/public/jquery/plugin-dev/
The plugin’s url is:
http://www.pritaeas.net/public/jquery/plugin-dev/jquery.highlight.js
Basically, I just want to remove all span tags with a specific class, leaving the text as-is.
Can anyone explain why opera is responding differently, and provide a solution or work-around ?
Thanks.
Problem is in your
removeHighlightfunction, in regex. I don’t know why, but your regex doesn’t work if it is in form:especially first
.?is problematic in this case. When you change it to.or\", then your regex works great. You can use\"form, as in correctly formatted html all attributes should be enclosed in parenthesis, and you can add them inhighlightfunction too: