Friday, August 9, 2013

call id tags with a variable name in jQuery

The one line of code here may be altered like so without issue:

var foo = "foo";
$("#" + foo).animate({ backgroundColor: "#548d57" }, 0).animate({ backgroundColor:
      "#75b249" }, 900);

No comments:

Post a Comment