Opening a dialog box in jquery with php content -
i trying open chat portal in dialog using jquery.
here code
<img class="chatbtn" id="chat_btn" style="margin-top: 10px; margin-left: 10px" src="images/colored_livecha.png" alt="" width="80" height="33" /> jquery('.chatbtn').click(function() { var dlg = jquery('#chat_btn').dialog({ autoopen: 'false', modal: 'true', minheight:'300px', minwidth: '300px' }); dlg.load('chat.php', function(){ dlg.dialog('open'); }); });
however on click nil happens. amendments required?
you'll need wrap in script tag.
<script> jquery('.chatbtn').click(function() { var dlg = jquery('#chat_btn').dialog( { autoopen: 'false', modal: 'true', minheight:'300px', minwidth: '300px' }); dlg.load('chat.php', function(){ dlg.dialog('open'); }); }); </script>
another question, jquery included in head or somewhere in page?
php jquery jquery-ui-dialog
No comments:
Post a Comment