Originally Posted by Dan
console.log is spitting "Object 7 has no method."
Meh. Guess I'll be re-reading documentation tonight.
|
I believe the problem is this. You declare index as
Code:
var index = $(this).index();
This is an integer, not an object. Therefore this fails (the integer has no method called "addClass"):
Code:
index.addClass("fave");
I believe this is what you want:
Code:
$(this).addClass("fave");