javascript - Colorbox opening just one time after form submit? -


we have situation form submit results had shown in colorbox. did jquery.post request , tried open returned html in colorbox. here code that.

jquery("#f1").submit(function(){     var formdata = $(this).serializearray();     jquery.post("index.php", formdata, function(r){         jquery.fn.colorbox({html:r,width:"80%",height:"80%",title:"event details"});     });         return false; // override non-ajax submitting     }); 

all works first time. when form submit happens first time opens in colorbox. second time opens in new page. wrong here?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -