Wordpress (and others) support
January 9, 2008 - 5:45am — ei99070
| Project: | jQuery Lightbox Plugin (balupton edition) |
| Version: | 1.0.0-final |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | ei99070 |
| Status: | closed |
Jump to:
Description
I use your plugin on Wordpress with the "wp_enqueue_script", but this function adds an "?ver=1.0" to the end of the url, making the "baseurl" calculation fail; I propose a change from:
this.baseurl = $('script[src$='+this.files.js.lightbox+']').attr('src');
this.baseurl = this.baseurl.substring(0, this.baseurl.length-this.files.js.lightbox.length);
to:
this.baseurl = $('script[src*='+this.files.js.lightbox+']').attr('src');
this.baseurl = this.baseurl.substring(0, this.baseurl.indexOf(this.files.js.lightbox));
This seems to work better when there are request parameters passed to the ".js" file!
Best regards, Pedro Lamas
| Attachment | Size |
|---|---|
| jquery.lightbox.js_.txt | 29.6 KB |
Comments
#1
The uploaded file that I made on the the first post, has the fix I proposed! ;)
#2
Included in v1.0.1-final available here: http://plugins.jquery.com/node/1200
Thank you for the fix. You have been credited within the changelog.