jquery - Invalid Assignment Left-Hand Side -


i trying assign class tag via jquery, resulting in error through firebug says "invalid assignment left-hand side" on fourth line below.

<cfoutput> $('.pngfix a').each(function(index) { var hreflink = $(this).attr("href"); if (hreflink.tolowercase() = '../audio.cfm') { $(this).addclass('audioimg');    } }); </cfoutput> 

looking around online, looks syntax problem, don't seem see it...

any tips?

thanks

if (hreflink.tolowercase() = '../audio.cfm') 

that attempts assign value, rather check equality. change = operator == .


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -