/    Sign up×
Community /Pin to ProfileBookmark

Disable scroll behind prettyPhoto lightbox

Hi there,

I apologize in advance if this question has already been previously answered, it’s difficult to research my particular issue.

I have a prettyPhoto lightbox plugin on my site. When I click the thumbnail, the lightbox window opens. The problem is that when I scroll, the lightbox shakes violently. I have tried every available option through CSS positioning and none of them suit my situation. I need to be able to DISABLE all scrolling while the lightbox is open.

I tried this:

<SCRIPT type=”text/javascript” language=”Javascript”>

var stop_scroll = false ;

function scrolltop(){
if(stop_scroll ==true){
scroll(0,0) ;
}
}
</script>

<script type=”text/javascript” charset=”utf-8″>
$(document).ready(function(){
$(“a[rel^=’prettyPhoto’]”).prettyPhoto({theme: ‘dark_rounded’});
stop_scroll==true;
});
</script>

This does nothing unfortunately. I am fairly new to javascript, and I imagine I am either approaching this incorrectly or I have some kind of syntax error.

PLEASE HELP!!!!!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@mavigozlerApr 18.2010 — This code usage looks like jQuery and a google search shows I am right. I don't use jQuery, Prototype, or any of the other (controversial? contentious?) specialized Javascript interfaces. But I would say, if you don't get an answer here, go the jQuery support forum (if it has one) or contact the developer to this prettyPhoto feature, who should be willing to respond to you (at least within a week) if he wants others to really love and use his interface. (I know I would.)
×

Success!

Help @webNinja84 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.20,
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,
)...