In my HTML I have a series of accordion tabs, all with the "twkTmr" class, but each may have a different value for the date. So I'm having trouble getting the right syntax to select $(this).value as an argument.
In my JavaScriptCode:<h6 id="32" class="twkTmr ui-accordion-header ui-helper-reset" value="2013-01-12" >Property_Name</h6> <h6 id="34" class="twkTmr ui-accordion-header ui-helper-reset" value="2013-01-22" >Property23</h6>
I have it at the end of an initialization function because it needs to happen @ page load and most of what I've read suggest $(this) has to be very picky about scope. So how do I pass $(this).value in as the argument. What I'm really wanting to do is add Class red to any divs that are over two weeks old.Code:$(init); function init(argument) { $("#addAproperty").click(addAproperty); $("#propertyManager").click(propertyManager); $("#submitbutton").click(openNewTkt); $(".shinybutton").button(); $("#accordion").accordion({ collapsible : true }); $("#pinner").spinner({ spin : function(event, ui) { if (ui.value > 300) { $(this).spinner("value", 1); return false; } else if (ui.value < 1) { $(this).spinner("value", 300); return false; } } }); $(".twkTmr").ready(function beRED (argument) { var value = 301; if (value > 300) { $(".twkTmr").addClass("red"); }; }); }



Reply With Quote




Bookmarks