TASK:
Select the element at index n within the matched set.
SOLUTION:
$(".example:eq("+index+")").css("color", "red");
EXAMPLE:
Select element at index 1 and set css property "color" to "red":
Select the element at index n within the matched set.
SOLUTION:
$(".example:eq("+index+")").css("color", "red");
EXAMPLE:
Select element at index 1 and set css property "color" to "red":
No comments:
Post a Comment