someguy
someguy

Reputation: 1035

Using Eval in watin

I've been getting error when trying to implement this

   ie.Eval("$(this).parent().removeClass("sortHelper");");

I was refering to this page :fire jQuery

and visual studio finds a syntax error.Is this the correct way for me to declare Eval?

Upvotes: 1

Views: 1348

Answers (2)

Guillaume86
Guillaume86

Reputation: 14400

Switch the quotes from the previous answer (single quotes are for char):

ie.Eval("$(this).parent().removeClass('sortHelper');");

Upvotes: 0

Matt Ball
Matt Ball

Reputation: 359966

You can see from the syntax coloring on Stack Overflow that you are prematurely terminating the string. Change your quotes to this:

ie.Eval('$(this).parent().removeClass("sortHelper");');

See the difference?

Upvotes: 3

Related Questions