not compatible with jquery 1.3.x
| Project: | jQuery Lightbox Plugin (balupton edition) |
| Version: | 1.3.5-final |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | balupton |
| Status: | duplicate |
Jump to:
I've made a mirror of the demo site and changed only the jquery to the latest 1.3.1 to demonstrate the problem:
http://pedro.dev.brain.sk/lightbox-balupton-demo/
the lightbox is not initialized and:
Firefox 3.0.5 reports an:
"[Exception... "'Syntax error, unrecognized expression: [@rel*=lightbox]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]"
Internet Explorer 7 reports an exception too

Comments
#1
I fixed/got around this by:
replacing line 830 in jquery.lightbox
$.each($('[@rel*='+orig)rel+']'), function(index,obj){with
$.each($('.lightboxholder'), function(index, obj) {This changes how you call lightbox a bit, as your link tags now need to have class="lightboxholder" in addition to the rel="lightbox" other than that change it works fine.
#2
You could also simply remove the @ from the
$.each($('[@rel*='+orig)rel+']')section, making it$.each($('[rel*='+orig)rel+']')(btw, search for
'[@1J*=in the code, and remove the @ in the packed version).edit: This way you don't have to change the function-call.
#3
Duplicate of:
http://plugins.jquery.com/node/5973
Thank you for your details.
#4