Kicking off method in javascript which uses jQuery -


basically i'm trying kick off jquery dialog box via javascript. have graph paper grid in users can choose color , fill in each square color chosen. when color chosen , filled i'd open jquery dialog can store name, type of art, image in chosen block.

var $dialog = $('<div></div>')         .html('this dialog show every time!')     .dialog({         autoopen: false,         title: 'basic dialog'     }); 

instead of this:

$('#opener').click(function() {         $dialog.dialog('open');         // prevent default action, e.g., following link         return false;     }); 

i'm doing:

opener(){ $dialog.dialog('open'); return false; } 

am able way? know lot of times these done having document.ready in waits event click instead of form button, etc. want open via javascript.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -