Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(this).attr("clicked") == "aa"
- if ($(this).attr("clicked") == "aa"){
- alert("aa");
- }
- <a id='Comedy' hoverb='green' clicked='aa'>want to laugh</a>
- $('.left a').live("click", function() {
- if ($(this).attr("clicked") == "aa"){
- $(this).css('background',black);
- alert("aa");
- }
- else {
- //do somethingelse
- }
- });
- <a id='Comedy' hoverb='green' data-clicked='aa'>want to laugh</a>
- $('#Comedy').on('click', function(e) {
- e.preventDefault();
- if ($(this).data("clicked") == "aa") {
- alert("aa");
- }
- });
- $('#Comedy').on('click', function(e) {
- e.preventDefault();
- if ($(this).attr("clicked") == "aa") {
- alert("aa");
- }
- });
- $(this).css('background','black'); <---- black needs to be bound in '' ..Missing that
- $(this).css('background',black);
- $(this).css('backgrond','black');
Add Comment
Please, Sign In to add comment