[jQuery] Problem with [@src
For the life of me, I can not get "img[@src" to work. I've already read the
post at
http://www.nabble.com/Problem-with--%40src-tf3147226.html#a8740073
Here's the code:
$find("img").click(function(){
switch($(this).attr("src")) {
case '1.gif':
$(this).attr("src","2.gif");
break;
case '2.gif':
$("img[@src=1.gif]").click();
$(this).attr("src","1.gif");
break;
}
});
Basically, if you click on '1.gif' it gets replaced with '2.gif'.
If you click '2.gif', find all '1.gif' on page, "click" to swap, and current
'2.gif' gets '1.gif'.
I've been totally unable to get [@src to work in this context or any other,
currently using 1.1.1.
--
View this message in context: http://www.nabble.com/Problem-with--%40src-tf3196513.html#a8875860
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/