Hi,
I need to hook all links, images, css and js call URLs inside my site and execute some operation when an event occurs with then.
Anybody knows how to handle all these events?
Best regards,
And Past
Hi,
I need to hook all links, images, css and js call URLs inside my site and execute some operation when an event occurs with then.
Anybody knows how to handle all these events?
Best regards,
And Past
Event handlers? <body onload="somefunction"> <img src="blah.jpg" onLoad="somejavascriptfunction()" onclick="someotherfunction">
and so on.
Can be done with most elements.
If you need to catch everything with the same function you could use jQuery. Something like this would attach a function to all links:
$('a').click(somefunction);
jQuery:
$("link, script, style, a, img").each(function(){
$(this).load(function(){
// do stuff when each of these elements is loaded
});
});
Not entirely sure if that is what you want, as your question isn't terribly clear, but that is how you can bind something to the load event for each of those element types.