/    Sign up×
Community /Pin to ProfileBookmark

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>[/CODE]

For some reason, when links are clicked, nothing happens, any ideas?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@PadonakMay 09.2013 — any errors?
Copy linkTweet thisAlerts:
@djadejonesauthorMay 09.2013 — any errors?[/QUOTE]

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!!
×

Success!

Help @djadejones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...