Subject: Kohls Survey Rewards - Expiring Soon

From: $25 for Your Wardrobe <[email-masked]>
Date: Mon, 11 Aug 2014 14:46:25 -0700

Does you Wardrobe need a pick need a pick-me-up?
Here's a $25 Gift-Card from Kohl's to help you out. 

Greetings Atompub-archive, 

Share your Opinion and Claim you Kohl's gift card. 

---------------------
Here's how you do it:
---------------------

1) Register here -> http://www.carderasound.com/voucher/kohls/july.html
2) Complete the Survey 
3) Claim your Kohl's Cash

[ July Member Rewards ]
Issued: August 11, 2014

-
=
-
=
-
To stop getting notifications from Daily Updated Alerts
9306 BOVA CT-L o u i s e v i l l e , KY four zero two nine one or visit http://www.carderasound.com/ei29/ki49g.skwo3

'
'
Great answer Peter. One question... why is it better to do with with JQuery than Javascript? JQuery is great, but if this is all you need to do the phrase "better yet x" often means "better yet (you can) x". 2) To get to the heart of the matter, jQuery is designed to aid in accessing/manipulating the DOM, and very often if you need to do this sort of thing once you have to do it all over the place. Be ware of that in case of Add Class Name there MUSt be White Space in front of the Class Name you want to add. Previous classes will stay. You'll have to remove other classes manually if you want to do that.   Micharch54  with this solution: When you click on your button multiple times, it will add the Class of " MyClass" to the element multiple times, rather than checking to see if it already exists. Thus you could end up with an HTML I guess the solution to that would be: if ( ! document.getElementById("MyElement").className.match(/(?:^|\s)MyClass(?!\S)/) ) or, with jQuery: if ( ! If yo
 u're trying to remove a class 'myClass' and you have a class 'prefix-myClass' the regex you gave above for three years and 183 upvotes and nobody spotted that until now. Thanks jinglesthula, I've corrected the regex so it wont incorrectly remove parts of class names. I guess this is a good example of why a Framework (like jQuery) is worth using - bugs like this are caught and fixed sooner, and don't require changes to normal code.   Peter Boughton Sep 15 '11 at 17:09 I've done some minor edits to improve the answer - hopefully people agree they are improvements?  Not sure if you think this is an improvement, but I like: (' '+document.getElementById("MyElement").className you are collapsing the surrounding spaces and regex to a null, which will concatenate the I use similar methods, but with a g (general) regex. the reason is exactly the issue described by @Web_Designer above: if the user clicks several times, you end up with multiple instances of the same class, and all instances Im
 porting an entire library to accomplish one, simple task is precisely why there is so much overhead drifting I have just made substantial additions to this answer - the bulk is the same, but I would appreciate feedback on When creating the regex with a variable for the class name I had to look up the syntax: var regExp = new One important detail missing here is the difference between framework and library. jQuery is a library, not a framework. Just for the safe of the example, a framework would be angularJs, for example