views:

179

answers:

2

i am using facebox

that give help for opening box from link

but i want to open box from jquery click function not from hyper link.

like $("#Button2").click(function() { code to open facebox });

thanks

+2  A: 

something like: jQuery.facebox('hi there')

jspcal
yes work for me. can we call other html or php file into it.?
air
sure, with jQuery.get()
jspcal
+2  A: 

.

$("#Button2").click(function() { 

  // to load html/php page
  jQuery.facebox({ ajax: 'remote.html' });
  jQuery.facebox({ ajax: 'remote.php' });

  // load image
  jQuery.facebox({ image: 'images/dude.jpg' });

});
Anwar Chandra