2011-02-16 69 views
0

我在文本框內有一個小的搜索圖像。當我從文本框中獲取標籤以搜索圖像時,當我們按下回車鍵時,我們需要打開對話框模式。我們這樣做。我們還需要打開對話框,當我們點擊搜索圖片時,我們已經有了這部分代碼。如何在選擇標籤上打開Jquery對話框模式

$('.searchimage').bind('click',function(){ 
    //Open Dialog and pass the parameters 
    to that dialog that are necessary. 

}); 

回答

1
$('.searchimage').click(function(){ 
    $('#mymodal').dialog('open'); 
}); 

如果創建對話框,只是沒有打開這將工作。

1
$('.searchimage').click(function(){ 
    $('#mymodal').dialog(); 
});