I have a jQuery plugin with an if statement in it.
For some strange reason (probably it is just me screwing things up) it always gets in the else part even when the url’s are the same.
if (opts.startUrl == track.permalink.url) {
var active = true;
} else {
alert('|'+opts.startUrl+'| |'+track.permalink_url+'|');
var active = false;
}
Check it out @ http://dev.upcoming-djs.com
The surrounding code uses
track.permalink_url, while theifblock evaluatestrack.permalink.url(which is alwaysundefined), so this condition:Always evaluates to
falseUpdate: as @brianpeiris points out, the correct fix here would be to change the condition to: