I make an edit button that issues a modal block with a form for editing it. JQuery then submits this form to my server and I get a JSON response. However, due to my problem with the bubbles, if I click, for example, all the edit buttons, and then click on the last and change the field, it does this through all of them.
$('.edit').click(function(event){
modal_submit(the_id);
event.stopPropagation();
});
and then the send event:
function modal_submit(the_id){
$('#modal form').submit(function(){
alert(the_id);
return false;
});
}
Finally, all this is inside getScript:
$.getScript('js/edit.js',function(){
create_edit_btn();
});
I used it only once and it worked, but I also had to do this.event.stopPropagation, but if I do this, it now says this.event undefined, but as I said, this exact code worked before for another script i did.
Does anyone have any ideas?: \
EDIT:
the html is:
<li>
<input id="item1" type="checkbox" value="webhosting|15" title="Web Hosting">
<p>Hosting for your web site</p>
</li>