View Single Post
06-26-2012, 01:48 AM
#4
Eirik-M is offline Eirik-M
Status: Member
Join date: Apr 2008
Location:
Expertise: Design
Software: Photoshop
 
Posts: 162
iTrader: 0 / 0%
 

Eirik-M is on a distinguished road

  Old

Originally Posted by Dan View Post
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");