I'm in the process of learning JQuery as I'm doing a major redesign of a site. I realize how nice it would be to do some styling in the javascript instead of remembering to add the right css class to every div (apparently, I like to forget such things).
Anyway, I want to add the style cursor: pointer;
to all elements that have a click event registered. I think it needs to look something like this:
$("div").Find(/*Has Click Event*/)
.css("cursor", "pointer");
$("div").each(function () {
if($(this).data("events") !== 'undefined' && $(this).data("events").click) {
$(this).css({"cursor": "pointer", "border": "1px solid red"});
}
});
Demo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With