I made a jQuery model.
Am trying to populate data using AJAX inside that model.
I am getting an id and using that I want to populate data using AJAX.
How should I call AJAX on click event?
Is there any other event when the model is opened or loaded?
The model is just the showing and hiding of div.
You almost have it, you need to prevent the default action which is to follow the
href
in the link, so add eitherevent.preventDefault()
orreturn false
, like this:Simply using:
JS:
HTML:
It is not tested, but as I see it, it should work...