I am using def default function to prevent my form from being paused. It's working fine, but following that function I'm no longer having an onClick function which is working.
Strange, onclick function I have a simple div centric function which is also doing the following form preventDefault is doing the following work?
Edit: I found this problem, the onclick function was for an item that was loaded by AJAX in the first function. So the selector was probably not finding this Below is my code: Any help on this Many thanks Try changing: / P> to: I think that
submit $ zip code ("#get_zip"). Submit (function (zip) {// submit zipcode $ .ajax ({type: "post", url: "ajax_calls.php", data: "zip =" + $ ('# zip') + & Amp; send_zip $ ("#Lightbox, #Welcome") .FadeOut (300);}, Error: Work () {Warning 3); $ ("# Error") Text ("Could not find post") fadein 300) .delay (900) .fadeOut (300)}}; .. // Stop form submission action zip.preventDefault ();}); // Center item box $ ("# item"). CenterInclient () ; // When clicking on an item line $ ("tr.item"), click (function () {// item id from selected row id var id = $ (this) .attr ('id'); // Fill the item $ .ajax box with item ({type: "post", url: "ajax_calls.php", data: "id =" + id + "& amp; ; Get_item = true ", success: function (r) {$ (" # $ ("# lightbox, #item"). FadeIn (300);}, error: function () {alert (2); $ ("# Error "). Text (" Do not Recover Post "). FadeIn (300) .delay (900) .FadeOut (300)}})}};
zip.preventDefault ();
return false;
preventDefault () is shouting and canceling your click handler.
Comments
Post a Comment