I have a page with a widget in it. There is no cross scripting. I want to use Jquery events to communicate between the two. How can I raise a jquery event on a div in widget and then catch it in widget and do something with it?
Any examples or code snippets would be really helpful.
If you can get by with the standard events then this is very simple. You bind an event handler to the div in the widget (assume the div has
id="widget") thus:then you can trigger that from elsewhere with
$('#widget").click(). It would be neat to define custom events to do this but that’s a bit more advanced. Once you have the basics working you can google “jquery custom events”.