facebox pop up image on load with a a link

Step 1

Load facebox

  <link href=”src/facebox.css” media=”screen” rel=”stylesheet” type=”text/css” />
  <script src=”src/jquery.js” type=”text/javascript”></script>
  <script src=”src/facebox.js” type=”text/javascript”></script>
  <script type=”text/javascript”>
    jQuery(document).ready(function($) {
        loadingImage : ‘src/loading.gif’,
        closeImage   : ‘src/closelabel.png’

Step 2

Writing th efunction tp pop up an image with a link on page load

<script language=”javascript”>
$(document).ready(function() {
    $.facebox.settings.opacity = 0.9;
    $.facebox(‘<a href=”http://abc.lk” target=”blank”><img src=”src/offer.jpg”></a>’);


Leave a Reply