1

Here's the source of the plugin: http://manos.malihu.gr/jquery-custom-content-scroller

And here's my page, it's not finished yet: XXX

When I scroll down both divs scroll together! I know nothing about jQuery and java, can you please help me?

1 Answer 1

2

Your problem is that you have two <div> elements with the same id attribute, this:

<div id="mcs4_container">

appears twice in your HTML. Your id attributes have to be unique within each page. The solution is to change on of them to (for example):

<div id="mcs6_container">

And this to your jQuery:

$("#mcs6_container").mCustomScrollbar("vertical", 200, "easeOutCirc", 1.25, "fixed", "yes", "no", 0); 

You could also replace your #mcs4_container binding to this to bind them both at once:

$('#mcs4_container, #mcs6_container').mCustomScrollbar("vertical", 200, "easeOutCirc", 1.25, "fixed", "yes", "no", 0);

Could also be just a copy and paste error. I notice that you have several "mcs*_container" <div>s mentioned in your jQuery.

Sign up to request clarification or add additional context in comments.

7 Comments

thank u sooo much ! but it looks like there's something wrong when i scroll the second div glamorous.p2h.info/ee =(
@emoo: I think you just need to change the position parameters for the scroller you attach to #mcs6_container; the second scroller seems to work, it is just in the wrong place.
hi, it's been over a month and i still have the same problem. but i found something; when i replace the gallery div with any text, the scroll works! i want to fix it and keep the gallery div in the same time, can you plz help me
@emoo: Do you have a live example of your problem? Is it still at glamorous.p2h.info/ee ?
@emoo: I think your <div> nesting might be messed up in the lower one. Trying removing the <div class="work">, copy <div class="updates">, change the id in the copy to mcs6_container, and then replace the text in the copy with your <ul>. You also don't have a clearfix CSS class and that's probably why the list is overflowing the <div>. I don't know why it is scrolling backwards, a minimal example of the problem on jsfiddle.net would be helpful.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.