Chaining dialog and load on multiple link
Hi ,
I have a page with différents links , all the links have an href attribute linked to a specific
page.
I'm trying to open this page inside a dialog by clicking the link.
I tried something like that :
-
- $(document).ready(function(){
-
- $('#dialogBox').dialog({
- bgiframe:true,
- autoOpen:false,
- height:400,
- modal:true
- });
-
- $('.linkCal').click(function(e){
- e.preventDefault();
- $('#dialogBox').load($(this).attr('href')).dialog('open');
- });
- });
But the dialog opens only once the first time i click a link. The other time i have an error like
$('#dialogBox').... is not a function.
Nevertheless if i remove the load() call , the dialog opens anytime whatever the clicked link.
Any idea ?
Thanks