Maybe $(this).attr('class') != 'Value' ?
Sorry, what I meant was that maybe $(this).attr('class') does not
equal "Value".
And that I wouldn't use $(this).attr('class') ...
--Karl
On Jun 13, 2009, at 8:53 PM, Karl Swedberg wrote:
Maybe $(this).attr('class') != 'Value' ?
I wouldn't bother using $(this).attr('class') anyway. Instead, try
this.className
And make sure that the class is, in fact, "Value".
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jun 12, 2009, at 9:22 AM, rinse_my_phonebook wrote:
var t = 'input.ffControl[value="Add a Value"]:first';
var s = 'input.ffControl[value="Add a
'+$(this).attr('class')
+'"]:first';
if(s == t) { alert(s); }
$(t,this).val('gotcha');
Hi there, Can anyone help me understand why changing the fourth line
of the above snippet to
$(s, this).val('gotcha')
does not have the effect that the orignal line has when the alert on
line 3 always shows?
Many thanks in advance for any effort, I appreciate it,
Rinse