JQuery :: Trigger Accordion Based On Scroll Position?

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


ADVERTISEMENT

Jquery :: Smooth Scroll Div With Accordion Menu

Jul 26, 2009

Here is an examples of what I would like to happen- smooth scroll when you press menu button on left section1/section 2 etc but for an accordion menu:

What I thought was important and tried was to include:

(and to include the actual js files, localscroll-min.js, scrollTo-min.js)

But just cant get it to work with the accordion menu- it works without it

What I think I may need to include is something like this link within my function for menu section.

View 2 Replies View Related

JQuery :: Trigger Scroll On A Select Menu?

Jan 5, 2012

How can i trigger scroll on a select menu? I tried to do it a lot. but I couldn't find any tricks. Please help me to do that.

ie, when i scroll on a country lists, without expanding the lists, how can i change values according to that scoll.

View 2 Replies View Related

JQuery :: Trigger A Click In A Specified Position?

Apr 11, 2010

I'd like to, for example, trigger a clic at (100px,50px) of the top/left corner of a div. Is it possible?

View 2 Replies View Related

JQuery :: Accordion Based On SlideToogle() And SlideUp()?

Aug 9, 2010

I am still using jquery a while but wouldn't rate my jquery knowledge very good. Actually i am trying to build an accordion based on slideToogle() and slideUp()... The only problem atm is that opened <ul class="children">...</ul> wrappers(yes they are the tooglin elements...) doesn't get closed, i think i missunderstud .siblings() and the hierarchy...?

[Code]...

I also asked myself if there is the possibility to detect if the first level <li>'s have a <ul class="children">...</div> inside - you can see it in my example that the last 2 first level <li>'s doesn't have any included. I would make sense to handle that 2.

View 3 Replies View Related

JQuery :: Trigger Scripts Based Off The Address Bar?

Oct 29, 2011

For example, can I use jQuery to trigger a script if the address bar says [URL]..

So jQuery would look in the address bar to see if the trigger was "true", and if it was it would activate the script.

View 1 Replies View Related

JQuery :: Adjust The Scroll Position Of An IFrame?

Jan 28, 2010

how to automatically scroll the page inside an IFrame? I have an IFrame that has no scroll bars, but there's a bit of whitespace that I want to get rid of. Unfortunately, the page in question doesn't have an element in the right area with an ID that I can anchor to.

Here is code I was toying with:

jQuery(document).ready(function () {
jQuery('iframe').contentWindow.scrollTo(20,20);
});

View 4 Replies View Related

JQuery :: Auto-scroll To A Certain Window Position?

Jun 21, 2010

How to window scroll automatically to a certain position on page load using jquery?

View 1 Replies View Related

JQuery :: Find Position Of Element In A DIV With Overflow:scroll?

Nov 21, 2011

I have a DIV with hegiht 500 px and overflow:scroll. I have 34000 A tags in it(each new line). Every A tag has its own ID. I want to scroll to these a tags so I need to know their position. How to find these?

View 1 Replies View Related

JQuery :: Save The Scroll Position In Order To Recover?

Jun 22, 2010

Is there a way to save the scroll position in order to recover it when the page gets reloaded or resend from the server?

View 12 Replies View Related

MooTools - Accordion To Have The Default Position With All Rows Closed

Mar 1, 2011

I have a Mootools accordion. The code is the following:

Code:
<script type="text/javascript">
window.addEvent('domready', function() {
var myAccordion<?php echo $uniqid; ?> = new Accordion($('accordion_sp1_id<?php echo $uniqid; ?>'), '.toggler', '.sp_inner', {
opacity: false,
onActive: function(toggler, sp_inner){
toggler.addClass('active');
[Code]....

I need that acordion to have the default position with all those rows closed. Now, I have a row active by default.Plus that, I want that the clicked row (despite that is active row) to be colapsed.

View 1 Replies View Related

JQuery :: Scroll To A Certain Position Inside A Scrollable Div On Page Reload?

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

JQuery :: Hide / Show Based On Scroll?

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

Scroll Position

Jul 23, 2005

Hey peeps, I'm trying to get a webpage open and start scrolled fully to the bottom. How should I go about this?

View 3 Replies View Related

Close Parent Window - Make The Scroll Bars And Drop Down Boxes Not Trigger The Function?

Jan 4, 2011

Ok so I have a site that I want to automatically close the window when the focus is lost from the page. For example, if the user clicks off the page to something else on there desktop I want the page to close. So far I have managed to do this but the grids on my page and the scroll bars all trigger the close function when clicked on. Is there anyway to make the scroll bars and drop down boxes not trigger the function?

This is the code I have so far.

View 6 Replies View Related

Restoring Scroll Position

Dec 5, 2005

Rather than have several different pages, an app was designed to have
different sections, all on one page. To get to the different sections the
browser is scrolled down. It may take several submits before everything gets
filled out correctly. The user complained because the page would not scroll
to the previous position, code was installed to save and restore the page
position, but it doesn't always go to the same place. Sometimes it does.
Sometimes it doesn't. Two text boxes are used to save position, and the page
is regenerated with x and y as literals by the server. The problem seems to
be what values are saved as the page is submitted. Code:

View 2 Replies View Related

Get Scroll Bar Position Of Body Tag?

Nov 24, 2009

How can i get scroll bar position of body tag?

View 2 Replies View Related

Get Body Scroll Position

Mar 21, 2004

How do I get the body scroll positions? I have a zoomable map which relies on mouse positions but it goes out when the page is scrolled.

View 2 Replies View Related

Ajax :: Based Trigger Link Click?

Oct 24, 2011

As I understand PHP has to use AJAX to store SESSION variable with simple link. I like to click on link and SESSION variable (SUBMIT) will be stored inside each SESSION.Is there any working example how to do it with AJAX and trigger this link click to store SESSION variable?

View 1 Replies View Related

Maintaining Place (Scroll Position) In DIV

Nov 6, 2009

I've got a div with an id of messages - It is essentially a chat system however chat usually adds messages to the bottom of a list which means the messages do not get pushed down while you are reading them. This system instead adds the messages to the top. I need a way of finding the current scroll position so that when a new message is added the scroll remains in the same place.

View 2 Replies View Related

Restore Vertical Scroll Bar Position?

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

Any Way To Remember Scroll Position (Vertical)?

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

Scroll Iframe To Specific Position?

Nov 4, 2010

Could someone tell me how I can modify.

function pageScroll() {
window.scrollBy(0,50);
}

to be applied to an iframe? I tried changing "window" to the id but that failed me and I'm really just getting started with Javascript. I've spent the last hour and a half on Google but haven't found it.

Or, is there a better way to achieve what it is I'm trying to do? I just want to have my iframe automatically scroll to specific position on the webpage.

View 2 Replies View Related

How To Remember / Maintain Scroll Position Of DIV

Nov 16, 2010

I am making an iphone app...the how-to section is basically one long page that shifts the view to a different div on a touch event. So, say I scroll down 50 lines on div1 and click a link to take me to the top of div2. How would I maintain the scroll position of div1 so when i click 'back' it shifts the view back to div1 and to the last position they were at?

View 2 Replies View Related

Storing Scroll Position In Hdden Field

Jul 23, 2005

I'm working with ASP.NET serverside and am looking for an easy way to
retain scroll position of the window.

Is there any way that a hidden form field could *always* have the
current document.scrolltop value set to it? Especially right before any
posting to the server is done.

I'm using asp.net datagrid code that does not give me any easy way to
tie javascript functions to controls - otherwise this might be easier.

Basically I guess I need grab to document.scrolltop and send it to the
server (so that I can return it when redering the page onload). But
<body onunload=> does not seem to work with my asp controls.

View 1 Replies View Related

Running A Loop That Checks The Position Of The Scroll Bar?

Mar 23, 2009

Running a loop that checks the position of the scroll bar. If the scroll bar height is the same as its div container it is always positioned at the bottom.Else the scroll bar is not positioned at the bottom and allowed to scroll freely.Problem I am having is telling the scroll bar to be positioned back at the bottom if the user scrolls to the bottom again.

Here is my Complete code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[code].....

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved