I have a method setup to fire onChange with the following code:
var product = $('#selProduct:visible');
var note=$('#bbdata');
product.selectProduct({
target: note,
url: 'product.php',
data: { ajax: true }
}).trigger('change'); // TO DO: to fire also on visibility change
Then I have a method where I make a div visible.
function show_product() {
hide_group2();
$("#product_zone2").show('fast', function(){
$("selProduct").trigger('isVisibleProduct');// custom trigger event
});
}
I want to change the method definition to fire also when I raise the custom event. How do I do that?
Just use jQuery bind to link your desired function to any type of event (event custom).
or
then trigger with
If your case you could put