Search Results

Search found 75 results on 3 pages for 'scrollto'.

Page 1/3 | 1 2 3  | Next Page >

  • scrollTo inner div only

    - by Nik
    I have a page with two scroll bars. I am using the scrollTo jquery plugin to jump to other areas on the same page. The problem is I only want the inner div to scrollTo and the outer div to remain at the top of the screen. Development site link click here This is the script $(".jump > li").click(function() { var qu = $(this).attr("id"); var an = "#" + qu.replace("q","a"); // step 8 $.scrollTo(an, {duration: 800, axis:"y"}); }); Any ideas?

    Read the article

  • jquery scrollTo refuses to work

    - by hasan
    hey, ive read all the scrollTo questions and couldnt find the answer. im trying to use the scrollTo plugin for a simple horizontal scroll (the site is horizontally designed). im using the following code $(document).ready(function() { $('#contactlink').click(function(){ $.scrollTo("#conta", {duration: 8000 }); }); }); as is obvious, contactlink is the anchor link while conta is the anchor where the window should scroll to. i know im missing something very obvious, but as im a beginner with jquery, id appreciate all the help i can get. is there any way to debug the functioning of the plugin? thanks

    Read the article

  • jQuery scrollTo minified

    - by strangerpixel
    I downloaded the latest jquery.scrollTo from the plugins site. Is there an obvious reason why the minified version does not work? With the exact same code the console throws the error: $.scrollTo is not a function

    Read the article

  • Scrolling down to next element via keypress & scrollTo plugin - jQuery

    - by lyrae
    I am using jQuery's scrollTo plugin to scroll up and down my page, using UP arrow and DOWN arrow. i have a bunch of div with class "screen", as so: <div class="screen-wrapper">...</div> What I am trying to do is, when i press UP or DOWN, the window scrolls to the next, or previous div with class of "screen". I have the keypresses taken care of. According to the plugin docs, to scroll a window, you use $.scrollTo(...); Here's the code I have: $(document).keypress(function(e){ switch (e.keyCode) { case 40: // down n = $('.screen-wrapper').next() $.scrollTo( n, 800 ); break; case 38: // up break; case 37: // left break; case 39: // right break; } }); And if it helps, here's the HTML div. I have a few of these on the page, and essentially, am trying to scroll to next one by pressing down arrow: <div class='screen-wrapper'> <div class='screen'> <div class="sections"> <ul> <li><img src="images/portfolio/sushii-1.png " /></li> <li><img src="images/portfolio/sushii-2.png" /></li> <li><img src="images/portfolio/sushii-3.png" /></li> </ul> </div> <div class="next"></div> <div class="prev"></div> </div> And also if it needed, I can provide a link where this is being used if it'll help someone get a better idea. edit And, i forgot to mention what the real question here is. The question/problem is that it won't scroll down past the first element, as seth mentioned.

    Read the article

  • scrollTo scrolls to the top of the page

    - by yanis
    Hi, I have the following Javscript code. When the page is loaded it is scrolled to the right position. When I click on the link to run the function the page scrolls to the top of the page. Has anybody any idea how to fix it? <html> <head> <script type="text/javascript"> function scroll() { window.scrollTo(0, 400) } </script> <title></title> </head> <body onload="window.scrollTo(0, 400)"> <img src="a.jpg"/> <a href="#" onclick="scroll">comments1</a> </body> </html>

    Read the article

  • Full Width Divs using ScrollTo.js

    - by David Haigh
    This is my first ever post. I am using the ScrollTo jQuery plugin and i have stumbled across a problem... I have 6 rows, each with 6 child divs , I would like each of these child divs to be full width. The plugin works great but I cannot seem to get the child div to be full width (then use ScrollTo to 'slide' to the next div, or to a div on the next row. ) Here is my code: http://jsfiddle.net/RZjrV/ Is it even possible? I have set body - Overflow:hidden to avoid any initial confusion. Thank you all who read this post and even take a minute to think about it. David

    Read the article

  • ScrollTo - toggle between min-height/fixed height

    - by Skoder
    Hi everyone, I'm trying to use the ScrollTo plugin, but I can't seem to get it working properly. I tried to view the source at the site I linked to but I'm trying to achieve something slightly different. I would like the window pane to change size according to the content (so the height would increase for longer text and would decrease for shorter text). However, when I supply a min-height (as opposed to a fixed height), the pane automatically changes to the maximum height when the page is loaded. So if I have something set to margin-top:1000px;, the pane will be 1000px in size regardless of what tab is currently displaying. The fix would be to use height instead, but that would mean that the window won't expand in height and the user would have to scroll. I got my code from viewing the source on the ScrollTo page, but I also tried this tutorial code. Thanks for any help

    Read the article

  • GWT - RichTextArea - ScrollTo

    - by Yanick Rochon
    If I have an RichTextArea like this : RichTextArea rta = new RichTextArea(); rta.setHTML("<p id=\"foo\">Foo</p>....<p id=\"bar\">Bar</p>"); If I extend the RichTextArea class, how would be the proper way (cross-browser wise) to write a scrollTo() method? Ex: class RichTextAreaExt extends RichTextArea { ... public native void scrollTo(String element) /*-{ // the underlaying DOMElement is an iframe, so.... }-*/; ... } Thanks!

    Read the article

  • jquery scrollpane and scrollTo at same time

    - by steve
    Current demo here: http://www.studioimbrue.com/sites/eliotdudik I have the tabs system working wonderfully. I'm trying to get it so that if you're down a ways on the gallery and then click "foreword" or any menu item, it scrolls you back to 0,0. The current sliding code is as follows: $('#wrapper ul li').click(function() { $(window).scrollTo($(this).next('li'), 500, {offset: {top:0, left:-50}}, {easing:'easeOutExpo'} ); }); And I'm trying to add something like this under it: $('#menu li').click(function() { $(window).scrollTo(0,0, 500, {offset: {top:0, left:-50}}, {easing:'easeOutExpo'} ); }); It continues switching tabs, but it won't scroll back to the beginning!

    Read the article

  • javascrip scrollTo(x,y) not working for me.

    - by harry_T
    I am trying to position the page to a specific location after user clicks on a link. I am using javascrip scrollTo(), but it is not working for me. Need advice or alternative way of doing this Try this link. http://tinyurl.com/ye5khug select Edmonton or Calgary, then select an option in column on right.

    Read the article

  • scrollTo (jQuery) won't work in firefox

    - by William
    For some reason, firefox seems to ignore my scrollTo function even though it works in chrome and safari. Here's an example link: http://blog.rainbird.me/post/2358248459/blowholes-are-awesome Chrome and Safari will automatically scroll to the top of the image (with an offset of 20 pixels) It doesn't work in firefox. I'm baffled! code: $(document).ready(function() { $(".photoShell img").lazyload({ placeholder: "http://william.rainbird.me/boston-polaroid/white.gif", threshold: 200 }); window.viewport = { height: function() { return $(window).height(); }, width: function() { return $(window).width(); }, scrollTop: function() { return $(window).scrollTop(); }, scrollLeft: function() { return $(window).scrollLeft(); } }; $(".photoShell img").hide(); $(".photoShell .caption").hide(); $(".photoShell img").load(function() { var maxWidth = viewport.width() - 40; // Max width for the image if(maxWidth > 960){ maxWidth = 960; } var maxHeight = viewport.height() - 50; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if(width > maxWidth){ ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", height * ratio); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image width = width * ratio; // Reset width to match scaled image } // Check if current height is larger than max if(height > maxHeight){ ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", width * ratio); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image } $(this).parents('div.photoShell').css("width", $(this).width() + 22); $(this).parents('div.photoShell').addClass('loaded'); $(this).next(".caption").show(); var scrollNum = $(this).parents('div.photoShell').offset().top; $.scrollTo(scrollNum - 20, {duration: 700, axis:"y"}); $(this).fadeIn("slow"); }).each(function() { // trigger the load event in case the image has been cached by the browser if(this.complete) $(this).trigger('load'); });

    Read the article

  • issues horizontal scrolling using jQuery.ScrollTo / jQuery.SerialScroll

    - by kapil.israni
    Hi, I am trying to develop auto horizontal scrolling for our website using - jQuery.ScrollTo / jQuery.SerialScroll. I am not sure if this is the best jquery library to do that, but if there's something better, please let me know. Here's the behavior that I want, check out foursquare's "Recent Activity" list. The data that will refresh will come from a ajax request that I make every few seconds using window.setInterval. I am not really a CSS/java script guy so I havent been able to figure out jQuery.SerialScroll. Here's the website - look at the "Live job Feeds" list. Currently the list does refresh the data coming from the ajax call, but I dont see the effect, the animation, in fact I dont even think serialScroll is being used. Right now I am doing a - $('#feed-ticker').prepend(content) to pre-append the newly arrived data. You can do a view source to look at the current code. Any help would be really appreciated. Thanks.

    Read the article

  • issues with horizontal scrolling using jQuery.ScrollTo / jQuery.SerialScroll

    - by kapil.israni
    Hi, I am trying to develop auto horizontal scrolling for our website using - jQuery.ScrollTo / jQuery.SerialScroll. I am not sure if this is the best jquery library to do that, but if there's something better, please let me know. Here's the behavior that I want, check out foursquare's "Recent Activity" list. The data that will refresh will come from a ajax request that I make every few seconds using window.setInterval. I am not really a CSS/java script guy so I havent been able to figure out jQuery.SerialScroll. Here's the website - look at the "Live job Feeds" list. Currently the list does refresh the data coming from the ajax call, but I dont see the effect, the animation, in fact I dont even think serialScroll is being used. Right now I am doing a - $('#feed-ticker').prepend(content) to pre-append the newly arrived data. You can do a view source to look at the current code. Any help would be really appreciated. Thanks.

    Read the article

  • How to correctly add the .scrollTo plugin?

    - by konzepz
    I have this script, running on a links list: $('li#linkcat-25 a').bind('click', function (e) { e.preventDefault(); $('#preview').load($(this).attr('href')); $('#loading').show('fast'); $('#preview').hide('fast'); $('#preview').show('fast'); $('#loading').hide('fast'); }); How can I easly add a .scrollTo effect, so that clicking on one of those href elements will show/hide as proposed, and when finished, will smoothly scroll down to the #preview div? Thank you!

    Read the article

  • Can't get ScrollTo to work with keyboard arrows

    - by adamwstl
    I'm trying to setup the Jquery plugin SerialScroll with Ariel's added keyboard controls. I'm calling these three JS files: serialScroll.js scrollTo.js keyboard.js (the keyboard control snippet) Html I'm trying to manipulate. Want it to jump from ind-photo to ind-photo on arrow left and right. <div id="photos"> <div class="ind-photo"><img src="2.jpg" /></div> <div class="ind-photo"><img src="3.jpg" /></div> </div> I can't get it to work at all. I know there are likely slight things that are going to be off, but this isn't working at all. Thanks in advance.

    Read the article

  • ScrollTo and toggle div

    - by user1466260
    I'm a big fan ov 8020.com and my goal is to create a porfolio with the same functionality like the one they have. Here is my markup This section should be hidden <section id="work-container"> <div id="work-list-51" class="work-details"> <h1> <div class="close-project"> </div> <div id="work-list-52" class="work-details"> <h1> <div class="close-project"> </div> <div id="work-list-53" class="work-details"> <h1> <div class="close-project"> </div> </section> This section will hold the thumbnails. When you click a thumbnail you will scroll to the top and the div will slidetoggle. <ul id="work-list"> <li id="work-list-51"><a data-page="51" href="#work-list-51"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> <li id="work-list-52"><a data-page="52" href="#work-list-52"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> <li id="work-list-53"><a data-page="53" href="#work-list-53"> <img width="230" height="230" alt="Mariann Rosa" src="sites/default/files/styles/square_thumbnail/public/field/image/mariann.jpg"> </a></li> </ul> I have come this far: $(document).ready(function(){ $("#work-list a").click(function(event){ event.preventDefault(); $('html, body').animate ( {scrollTop: $('#top').offset().top}, 800 ); }); $('#work-list a').click(function(e) { $('#work-container > div').hide(); $(this.hash).slideToggle(1600); }); }); It scrolls to top and the div becomes visible but it does not work correctly :)

    Read the article

  • mootools 1.1.1 scrollto element with class name ... anything like jquery?

    - by dtour
    I get the impression mootools will do this, but in a roundabout way. I am working with livevalidation script. What I want to achieve is when the from runs and errors are generated then the page will scroll to the first error found. This will be outputted as: <span class=" LV_validation_message LV_invalid">Can't be empty!</span> with jquery I could do the following: $.scrollTo($('span.LV_invalid:1')); I get the feeling in mootools I have to first find the position of the first span with class LV_invalid then pass this to the scrollTo function or is there a much simpler solution?

    Read the article

  • JQUERY, scrollTo, after scrolling down, the page won't let me scroll up for a second... Y?

    - by nobosh
    I'm using the following JQUERY to attach an even to a link in the header, which essentially scrolls to the bottom of the page: $('#comment-count-btn').click(function(){ $('html,body').scrollTo('#comment-wrapper', 500); }); Problem is, that it scrolls all the way to the bottom of the page (which is correct), but then when I try to scroll up a tad, the scroll bar jumps, as if it's locked for a little bit. Any ideas?

    Read the article

  • Android TranslateAnimation after scrollTo() = undrawn view

    - by user293354
    This might be a "duh" question but I'm going to go ahead and ask it anyway. I have an oversized (bigger than the screen) RelativeLayout, and I'm using swipes to start a TranslateAnimation from viewing one part of the layout to another. Say for instance the layout is two screen wide and two screens tall. After the nice animation to shift the screen, I was using View.scrollTo() to set the new position. This works fine going from the first screen (top left at 0,0) to one of the others. When I swipe to animate back to the first screen though, because the View.scrollTo() invalidated that part of the layout (I assume), that part of the layout is all black as I animate through it. I tried a couple things to get it to redraw itself after the scrollTo() but haven't had any luck, so I figured I'd ask here. thanks! joe d

    Read the article

  • jQuery using .html & then window.scrollTo

    - by AnApprentice
    Hello, I'm doing the following: First, inject HTML into the page (a lot) which then increases the window scrollbar: $("#XXXX").html("LOTS OF HTML").show(); Then i want to scroll down to the end of the page: window.scrollTo(0,$(document).height()); Problem is the page never scrolls down. I did some console.logging and the scrollTo is running before the HTML from the inject html() is run. I tried this in the JS which injects the HTML, I then tried doing the scroll inside the HTML inject but that made no difference. Any ideas?

    Read the article

  • Animating View.scrollTo(...)

    - by alex
    How to implement scrolling animation? I'm ok with setting a simple AlphaAnimation that triggers at scrollTo(...) but what kind of animation is required for one screen to replace another in a sophisticated manner?

    Read the article

  • Why specifcially in my example does this "too much recursion" error occur in my JavaScript?

    - by alex
    I have been looking into this for a little while now. I have a gallery on my page, that uses Ariel Flesler's scrollTo plugin. It works fine on the home page, but not on the Contact page. In Firefox, I get the error... Too much recursion I have sorted through as much code as possible and set breakpoints in a few places. I am pretty sure it is something to do with the plugin (specifically, when it is called in the click handler). For your convenience, I am using the unpacked versions of jQuery and scrollTo plugin. What on earth am I doing wrong? Thanks for your time.

    Read the article

1 2 3  | Next Page >