View Single Post
Old 10-01-2011, 05:03 AM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
Hi Elliott,

Good day!

From a first glance, it's caused by the original variable being in the local scope of the click function listener you created.

The quickest solution is to remove highlighted:
Code:
$(".info").click(function() {
var original = $(this).html();
...and somewhere on top of everything, set original as a global variable by:
Code:
var original;
Lastly, I'm surprised $('.cancelButton').click( works. I should have suggested to use live() method instead.

Hope that helps.
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote