JQuery :: Synchronizing Vertical Scroll Of 2 Divs Based On When Waypoints Inside The Content Are Reached?
Nov 1, 2011
To synchronize the vertical scroll of the following "left" and "right" divs only when the beginning and end of each "blahN " div is reached inside the left div. Both divs have a finite height, which basically insures that the scroll bar will be present. The left div outputs text-based content from various database procedures while the right div outputs images corresponding to the text. The text is nothing more than pages from the website and as you can see inside the left div, each is encapsulated within a subsequent div with an incremental class (i.e.- "blah1", "blah2", and so forth.) When one scrolls through each "blah" content inside of the left div, I would like the right div to output the image that corresponds to the text (again, this data comes from the website through previous transactions.) Here's an example: John Doe comes to the website and starts reading the various pages listed inside the left div.
There might be 2 pages loaded inside the left div, or, there might be 20, but in any event, when he loads the entire page containing all this, the first page will be displayed along with the first pages' image. When he scrolls past this first entry (page) inside the left div, the corresponding image related to it inside the MySQL database is then output as well over in the right div and so on with every other "blahN " piece of content. Right now, the jQuery I'm using has synchronized both divs to scroll at the same time, regardless of specific waypoints that might be reached per-scrolling.
Here's the basic markup I'm using right now:
<div class="left">
<?php
foreach($obj->field_page_objs as $k1=>$v1){
[code]....
few other websites and the responsiveness has been minimal-to-nonexistent. I'm sure this is because of both how I've explained the problem combined with the overall difficulty (or niche-ness) it introduces. In any event, I apologize beforehand if this carries over into this website.
View 4 Replies
ADVERTISEMENT
Mar 6, 2009
I have been googleing and searching Sitepoint for a fading or vertical scroll multi browser script with no luck.
Can someone help me finding a good script that work on most popular browsers such FF, IE, Safari and Opera to scroll of fade news. The news content has an image, text and link.
View 5 Replies
View Related
Aug 9, 2009
how can I show / hide the content of sub divs based on whether the input is != or = and be able to repeat this.I tried to hide the sub divs using , onclick if bla bla = '' ;document.getElementById('hideme').innerHTML = ''; which works, but once I try to enter a new input, then nothing happens, even if the content of the sub divs is = input.
View 2 Replies
View Related
Jul 11, 2011
I'm using Jquery to power my horizontal scrolling portfolio site.[URL] I have a problem that on a smaller browser window elements becomeverticalscroll-ableand id rather it force you tore-sizerather then break the design. Using the basic CSS Overflow:Hiddenisn'tan option because it then sticks the horizontal scrollbar wherever the end of your page loads at, making anuglybar across the middle of largerresolutionscreens. I used a mootools approach thatremovesonly one of the scrollbars, but mootoolsdoesn'tplay nice with jquery in this fix.
Has anyone tried to attempt this? or am I just banging my head against a problem andover complicatingthis? I could always just make the page elements smaller, but liking my big photo presentation.
Oh and I dont mind about compatibility with IE6, im in the graphic design business, all the people im showing this too have a more modern browser or use the 64-bit IE.
View 3 Replies
View Related
Jul 20, 2005
is there any way to disable or lock vertical scroll bars on a browser
window? im a newbie and i just don't want them to appear on my screen.
sometimes they appear on IE but not on mozilla.
View 3 Replies
View Related
Sep 22, 2010
Not sure if this is a browser feature kind of thing, or if it can be done with a script.
I'm looking at my page: www.mysite.com/index.php?start=0
I scroll to the bottom of the page with the vertical scroll bar, and then click the pagation link to start on page 2, record #50: www.mysite.com/index.php?start=50
Of course, the vertical scroll bar jumps back to the top of my page.
Is there a way to make it remember that the scroll bar was at the bottom (or in the middle)?
View 1 Replies
View Related
Jun 29, 2009
I want to remember the scroll position (Vertical). So I have 100 articles per page and I pick
one article to view its details.. that is on new page. So when I hit the browser button (back) I would like that browser puts the scroller where it was. I think I should use cookies for that... but how?
View 1 Replies
View Related
May 16, 2010
I want the horizontal scroll to be hidden and the vertical scroll shown, how do i do that?
View 2 Replies
View Related
Mar 23, 2011
I have to develop a vertical image scrollbar where 5-6 images will be displayed at a time and up-down movement will be controlled by arrows. I searched alot over net but didnt found exact result. either images were scrolling automatically or they were controlled by the position of mouse-cursor. Also I found script where single image comes on screen at a time (slideshow kind)which was controlled by up-down arrow.
View 1 Replies
View Related
Sep 18, 2007
The problem I'm trying to solve is that the
designer would like to limit the total number of entires shown when
you click on the drop-down arrow of a select box. I'm starting to
think that this isn't possible.
I've tried the following with no luck:
- Setting the height attribute on the select element
- Setting a style height for the select attribute
- Modifying the same through Javascript
- Setting the style overflow-y to scroll
- Setting the size of the select element
At some point in my browsing someone claimed that the vertical scroll
bars are controlled by the OS/Browser and there are no ways to change
this using JS or CSS. That the magic number of IE is 30 entries before
the vertical scroll bar shows up.
View 4 Replies
View Related
Sep 27, 2011
I was wondering if there is a javaScript code for a vertical slider. Basically, I'm presenting a menu, that needs to fit in a certain amount of space and it is much taller than the space allotted.
I was going to use an iframe, but I thought that there might be some JavaScript I could use that would be more elegant. I just need to scroll text on a page.
View 10 Replies
View Related
Aug 5, 2011
I am currently working on creating a vertical scroller and have got so far but have got stuck on some of the functionality.
My HTML looks like this
div class="outer">
<div class="slider-content clearfix"><ul>
<li><img src="images/img1.jpg" width="200" height="200" alt="img1"></li>
<li><img src="images/img2.jpg" width="210" height="200" alt="img2"></li>
<li><img src="images/img3.jpg" width="220" height="210" alt="img3"></li>
<li><img src="images/img4.jpg" width="210" height="200" alt="img4"></li>
<li><img src="images/img5.jpg" width="200" height="200" alt="img5"></li> .....
My CSS is as follows
*{margin:0px;padding:0px;}
li{list-style:none;float:left;height:200px;width:200px;}
.clearfix { overflow: hidden; display: inline-block; }
.clearfix { display: block; }
.outer{margin:45px auto;position:relative;height:500px;width:515px;border:1px solid #333;overflow:hidden;}
.slider-content{position:absolute;top:0px;left:0px;}
.top-hover, .bottom-hover{width:515px;height:50px;background:#ccc;}
.top-hover{position:absolute;top:0px;z-index:500;}
.bottom-hover{position:absolute;bottom:0px;}
And finally my JS
$(function(){
$('.outer').prepend('<div class="top-hover"></div>');
$('.slider-content').after('<div class="bottom-hover"></div>');
//Get height of outer container and slider
var outerHeight = $('div.outer').height();
var contentHeight = $('div.slider-content').height();
// Calculate cut off point of displayed contents
var contentExcess = contentHeight - outerHeight;
//store end point of scroll
var maxTopScroll = 0 - contentExcess
var speed = 45;
var hovered = false; .....
//If scroll reaches max then stop
alert('No movement');
}},
function(){
return false;
});});
Currently the scroller moves up and down when you hover over the top and bottom buttons however you have to keep moving in and out of the hover area in order to get the scroller to move. How can you make it so that it will do a continuous scroll of the scroll-content div. Also currently the script has no way to limit the end of the scroll-content div and I cant seem to get it to stop once it gets to the bottom of this div.
View 2 Replies
View Related
Mar 7, 2010
The link is here [URL] Click on description. Move the scroll bar on the right to the bottom and then click on description again. Instead of the thumbnails scrolling up to hide the description, the main image and header move down. Any tips on addressing this. My brains are a bit frazzled at the moment. Do I need to fix the vertical scroll position somehow. What properties do I need to be looking at? (Note : I'm currently animating the height property of the description box.) Second question. I did have auto margins in the wrapper centering the page. When you click on description it causes the scrollbar on the right to appear, which shifts the page over to the left. I've since fixed the margin, but again is there a way around this so that I can center the page again?
View 1 Replies
View Related
Aug 22, 2011
I'm trying to build a simple "teleprompter" type web page for use on my tablet PC. I have the page constructed so that the words appear inside a div of fixed height, overflow hidden. I would like to have a simple "play button" along a fixed top menu that starts the words scrolling up inside the div below. I'll need to be able to hard code the speed of the scroll for now. I really don't know where to start on this one... it doesn't need to be complicated... just needs to work on the javascript-capable browser of an android-based tablet.
View 5 Replies
View Related
Jan 20, 2011
This supposed to be simple, but I don't really know jQuery in order to implement this the proper way.All I want is to create a div with some text inside. The div will be overflowed some text will be visible.So all I want to do is to create to small links "up" and "down" so when the visitor clicks on then the text scrolls up or down. like this effect hereI tried to do some search ... but all I find are plugins and scrollers to create carousels or so
View 3 Replies
View Related
Mar 29, 2010
I've got a fixed div that has a fixed tab as a trigger. I'd like to only show the trigger tab when the user scrolls down the page "X" pixels from the top (say like 200px). Can someone point me in the direction of implementing this?
View 4 Replies
View Related
Aug 3, 2009
have such a structure in HTML which finally looks like shown on this
[Code]...
View 5 Replies
View Related
May 21, 2009
Anybody know how to create this effect on mootools? code...
View 5 Replies
View Related
Jun 21, 2010
I'm wondering if someone could point me in the right direction on this. I have an accordion set up which is all working fine. Clicking accordion elements scrolls a main div into position (y-axis). However, i would like to trigger the accordion externally. More specifically, if the user manually scrolls the main content div (using the browser scrollbar or their mousewheel) i would like to trigger the relative accordion section based on the scroll (y-axis) position of the scrolling div. What would be the best way/plugin for achieving this?
The positions would be very specific so there could be an array of y-pos values. Alternatively, for the accordion scroll function anchor links are already set up in the main scrolling div so would this be the best option? I'm just struggling to see how to achieve this.
View 1 Replies
View Related
Nov 14, 2011
I am trying to get the height of a div that is inside 7 other divs. I noticed the height() method works with the first and second div, but it does not work after that.
Example :
<div id="first">
<--------------------------- $("first").height(); works ![code]....
how to get the height of a div that is inside multiple other divs ?
View 1 Replies
View Related
May 27, 2010
i have a div of height 500px and width 800px. i have set it as auto on over flow and usually i have 500 records displayed so it scrolls. lets say i trigger an even on row number 478 inside that scrollable div and that event causes a page reload, can i go back to that same position in side that div? how?
View 1 Replies
View Related
Jun 7, 2009
My idea is to click on one div that contains some stuff and move it to another place inside the screen. Is it possible with jQuery?
View 1 Replies
View Related
Jan 9, 2010
I'm pretty new to JavaScript and I've been searching for a way to toggle the visibility of many divs with images inside. Basically I want to have nothing visible, then I have three links that represent three categories of the images. So for example if the user clicks the link "Illustration" I want all the divs with the class illustration to appear. But when the user chooses a new link say, "typography" I want to hide the divs with class illustration and then show the divs with class typography.
View 1 Replies
View Related
Aug 14, 2011
I am using the bookflip plugin i found here: [URL]
I am attempting to modify the code so the book pages resize based on the screen width... or height... not really sure how this should be done as I need the proportions of the pages to stay consistent.
I have been able to achieve the resize on page load but I now need to add the resize() method to the variable.
This is what I have so far (original code):
var $containerwidth = $(window).width();
var $pagewidth = $containerwidth/1.22;
var $pageheight = $containerwidth/2.05;
I think I need to add an if() statement in the variable that says if page width or height changes resize else original code that is working. I have this code which I know works but I can't seem to get to work with one variable without overriding the original code... which doesn't work with this application.
$(window).bind('resize', function(){
$(window).width()/1.22;
});
Is this the correct approach to achieve this. I have found I must work within the original JS file as overriding will not work.
if(..........? page resizes ?............){
$(window).bind('resize', function(){
$(window).width()/1.22;
});
[Code].....
View 17 Replies
View Related
Jul 28, 2010
jQuery.crSpline - Smooth 2D animation along paths of multiple waypoints, using Catmull-Rom splines.
Demo GitHub You provide: A series of (x,y) points that the path should follow. Plugin provides:
Animation along a smooth 2D path that intersects all points. Check out the demo page to see what it looks like.
[Code]...
I just published an early release of this and am looking for feedback from other developers! I made it because I needed an easy way to make animations out of extended sequences of coordinates (without doing the math to stitch together bezier curves), and as far as I could tell no one else had published an easy method to animate along Catmull-Rom splines using jQuery. This is the result, and the hope is that it will be super easy to use and helpful for people besides just me.
Future plans: More general animations and customizable behavior. The current version only animates top and left properties along whole pixel values. It also assumes that every segment of the path should take equal time, resulting in some strange speed changes when moving from small to large segments. Currently brainstorming good fixes for all of these.
View 5 Replies
View Related
Jun 13, 2009
I'm trying to selectively hide and show divs based on what a user specifies using three select boxes in a form. I'm probably missing something obvious, but here's what I've got and it doesn't, work, they divs just stay hidden.
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
[Code].....
View 2 Replies
View Related