jQuery: The Write Less, Do More JavaScript Library

Wordpress (and others) support

Project:jQuery Lightbox Plugin (balupton edition)
Version:1.0.0-final
Component:Code
Category:bug report
Priority:normal
Assigned:ei99070
Status:closed
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

AttachmentSize
jquery.lightbox.js_.txt29.6 KB

Comments

#1

Assigned to:Anonymous» ei99070
Status:active» fixed

The uploaded file that I made on the the first post, has the fix I proposed! ;)

#2

Category:feature request» bug report
Status:fixed» closed

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.