well for a noob this was a great guess and hitting solution ;)

Thx a lot Miel!

> Not quite sure (total javascript noob here :) ), but i think the contains 
> method is meant to be fired on an element, not on an attribute value (and any 
> String for that matter)
>
> Guru's, correct me if i'm wrong ;)
>
>
> Something like this should work: 
> (not tested btw)
>
>   var arrowSrc = $(arrow).src();
>   if(arrowSrc.indexOf("right") == -1 )
>     //do this
>   else
>     //do that
>
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] namens stargate
> Verzonden: di 24-10-2006 21:01
> Aan: jQuery Discussion.
> Onderwerp: [jQuery] Why doesnt this work ?
>  
> Hello jQuery guru's :)
>
> could someone tell me why this code doesnt work ?
>
> -----------------<CODE>--------------------
>
>  var arrow = $("#draghandle").find("img");
>  if($(arrow).src().contains("right") != ""){
>   $(arrow).src("Modules/User_Manager/images/arrow_down.gif");
>  } else {
>   $(arrow).src("Modules/User_Manager/images/arrow_right.gif");
>  }
> -----------------<CODE>--------------------
>
>
> Error-Message: $(arrow).src().contains is not a function
>
>
> Thx and sorry for my stupidy :)
>
> Ralf
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>   


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to