Hi All, I cant seem to find the right way to check for the HitArea div class. I'm using a nice piece of code found here as follows: I need to be able to know when the class name changes between "hitarea expandable- hitarea" and "hitarea collapsable-hitarea" .. All I can get to work is the "hitarea*" and this doesn't cut it..Any assistance would be greately appreciated as I'm realtively new at JQuery. NOTE: I also tried catching just the LI tags collapseable and expandable but to no avail..
$(document).ready(function(e) { jQuery.delegate = function(rules) { return function(e) { var target = $(e.target); for (var selector in rules) if (target.is(selector)) return rules [selector].apply(this, $.makeArray(arguments)); } } $('#black').click($.delegate({ '.hitarea*': function(e) { alert("hit3"); }, '.folder': function(e) { $('#errMessage').empty(); $("#lblLMSFolder").empty(); $("#lblLmsAlignedClassTitle").empty(); $("#lblLMSFolder").toggle().append($(e.target).closest (".folder").text()); } }); SNIP of markup <li id="" class="expandable"> <div class="hitarea expandable-hitarea"/> <span class="folder">HR Management</span> <ul style="display: none;"> <li id="" class="last"> <span class="file"> <input id="1" class="checkclass" type="checkbox" name="checkbox"/> Attendance Management.zip </span> </li> </ul> </li>