www.webdeveloper.com
Results 1 to 3 of 3

Thread: lightbox_me popups not popping up.

  1. #1
    Join Date
    Jun 2011
    Posts
    140

    lightbox_me popups not popping up.

    I am having some trouble getting some popups to appear with lightbox_me.
    The website says just use display: none; on the div you want to pop up, put the script in and voila, it should appear.
    I have 3 links with ID of "head_thumb1", "head_thumb2" and "head_thumb3" and the sections I want to pop-up have an ID of "popup1", "popup2" and "popup3".

    My script is in my footer and is as follows:

    Code:
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="<?php bloginfo('template_url'); ?>/js/jquery.lightbox_me.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                function launch() {
                    $('#popup1').lightbox_me({centered: true, onLoad: function() { $('#popup1').find('input:first').focus()}});
    		$('#popup2').lightbox_me({centered: true, onLoad: function() { $('#popup2').find('input:first').focus()}});
    		$('#popup3').lightbox_me({centered: true, onLoad: function() { $('#popup3').find('input:first').focus()}});
                }
                
                $('#head_thumb1').click(function(e) {
                    $("#popup1").lightbox_me({centered: true, onLoad: function() {
    					$("#popup1").find("input:first").focus();
    				}});
    				
                    e.preventDefault();
                });
    		
    		$('#head_thumb2').click(function(e) {
                    $("#popup2").lightbox_me({centered: true, onLoad: function() {
    					$("#popup2").find("input:first").focus();
    				}});
    				
                    e.preventDefault();
                });
    
    		$('#head_thumb3').click(function(e) {
                    $("#popup3").lightbox_me({centered: true, onLoad: function() {
    					$("#popup3").find("input:first").focus();
    				}});
    				
                    e.preventDefault();
                });
                
                
                $('table tr:nth-child(even)').addClass('stripe');
            });
        </script>
    For some reason, when links are clicked, nothing happens, any ideas?

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,654
    any errors?

  3. #3
    Join Date
    Jun 2011
    Posts
    140
    Quote Originally Posted by Padonak View Post
    any errors?
    There was a few, but just this min managed to sort it, was using latest version of jquery but browser detection had been removed in a previous version and in the lightbox_me.js there was alot of references to ie6, just changed jquery to an older version and this sorted it.

    Always the simplest of things!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles