Search Results

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

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

  • IE Problem: Jagged Scrolling and Dragging Inside Large Viewport

    - by br4inwash3r
    My site is a single page website with a very large "canvas" size. and to navigate around the site i'm using jquery scrollTo and jquery Dragscrollable plugin. in IE 7 & 8 the scrolling/dragging movement is very jagged. at first i thought it was my script or some other plugin that's causing this. but after i stripped down everything it's still the same. i've tried a few tips i've found around here. but none is really working for me. i know i should be asking this question to the plugin developers. i did.. i just thought maybe you guys have some other solution for this issue. here's the URL to the demo site: http://satuhati.com/bare/template/ really appreciate any help u can give :) thx..

    Read the article

  • jQuery: move window viewport to show freshly toggled element

    - by k00k
    I have a simple bit of jQuery in doc ready which toggles a div containing a textarea: $('div#addnote-area').hide(); // hide the div $('a#addnote-link').click(function() { // click event listener on link $('div#addnote-area').toggle(); // toggle the hidden div }); The toggle works fine when clicking the link. The problem I'm having is that if div#addnote-area is below the browser's current viewport, it remains there when it's shown. I'd like the user's cursor to go to the textarea and for the whole textarea to be viewable in the window. Click here to see an image for more context

    Read the article

  • Jquery Scrolling

    - by Rich - Pixel Vector
    I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li a, ul.navtwo li a,a.toplink, a.bodylink').bind('click',function(event){ var $anchor = $(this); $('html, body, header').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1500,'easeInOutExpo'); event.preventDefault(); }); }); This all works correctly. However, in my layout I have a fixed header div (i.e. it stays in place when the user scrolls). Therefore I need to set an offset for the scrolling script of 117 pixels. How do I do this please?

    Read the article

  • jQuery scrollTo plugin to scroll screen to div wouldn't work, why?

    - by Michael Mao
    Hi all: I am working on a web application, whose mock-up page can now be found at: our server If you click on the blue title "step1" and then choose the option of "delivery to address", a form will show up using jQuery ajax load. No problem for this. Click on the "venue" radio button will take you to another form, no problem for this as well. If you scroll down a bit, you can see a textarea, top of that you can see a link called "what's this?". Click on it and the textarea shall be filled with sample words. The problem is, after clicking on the link, the webpage automatically scrolls to the top section. What I want is to keep the textarea to the center of screen after link is clicked. I am trying to use a jQuery plugin called "scrollTo", which can be found here From its demo page I can tell is what I want. And here is my code to try using it: function reloadDeliveryForm() { $('#deliveryForm').load('./ajax/deliveryToVenueForm.html', function(response, status, xhr) { if (status == "error") { $.prompt("Sorry but there was an error, please try again.<br />" + "If same error persists, please report to webmaster."); } else //deliveryForm loaded successfully { validateDeliveryForm(); $("#delivery_special").elastic(); $('#special_conditions_tip').click(function() { console.log("start filling"); fillTextareaWithExample(); console.log("end filling"); $.scrollTo('#delivery_special'); console.log("end scrolling"); }); } }); } From Firebug output I can tell the scrollTo function is called, but doesn't work. I've switched jQuery back to version 1.3.2, which is used on the demo page of the plugin, but that wouldn't help, either. Is there a problem with my coding? Which technique would you use to resolve this problem? Any suggestion is much appreciated.

    Read the article

  • animated scroll

    - by Happy
    Using scrollTo plugin to animate scroll effect: http://plugins.jquery.com/project/ScrollTo http://demos.flesler.com/jquery/scrollTo/ Tryed this code: $(".top-scroll").hover(function(){ $("body").scrollTo($(".top-corner"), 2000); },function(){ $("body").stop().scrollTo(); }); It must start to scroll when we hover .top-scroll block (mouseover) and stop when we hover it out (mouseleave). Start works, stop - not. How to fix? Thanks.

    Read the article

  • I get an `Cannot read property 'slice' of undefined` message when I use the scrollTo jQuery plugin inside this function

    - by alexchenco
    I'm using the jQuery scrollTo plugin. I get this error in my JS Console: 16827Uncaught TypeError: Cannot read property 'slice' of undefined d.fn.scrollToindex.html.js:16827 jQuery.extend.eachindex.html.js:662 d.fn.scrollToindex.html.js:16827 jQuery.extend.eachindex.html.js:662 jQuery.fn.jQuery.eachindex.html.js:276 d.fn.scrollToindex.html.js:16827 popupPlaceindex.html.js:18034 (anonymous function)index.html.js:17745 jQuery.extend._Deferred.deferred.resolveWithindex.html.js:1018 doneindex.html.js:7247 jQuery.ajaxTransport.send.script.onload.script.onreadystatechange When I place $(".menu").scrollTo( $("li.matched").attr("id"), 800 ); inside it. function popupPlace(dict) { $popup = $('div#dish-popup'); $popup.render(dict,window.dishPopupTemplate); if(typeof(dict.dish) === 'undefined') { $popup.addClass('place-only'); } else { $popup.removeClass('place-only'); } var $place = $('div#dish-popup div.place'); var place_id = dict.place._id; if(liked[place_id]) { $place.addClass('liked'); } else { $place.removeClass('liked'); } if(dict.place.likes) { $place.addClass('has-likes'); } else { $place.addClass('zero-likes'); } var tokens = window.currentSearchTermTokens; var tokenRegex = tokens && new RegExp($.map(tokens, RegExp.escape).join('|'), 'gi'); $.each(dict.place.products, function(n, product) { $product = $('#menu-item-'+product.id); if(liked[place_id+'/'+product.id]) { $product.addClass('liked'); } if(tokens && matchesDish(product, tokens)) { $product.addClass('matched'); $product.highlight(tokenRegex); } else { $product.removeClass('matched'); $product.removeHighlight(); } if(product.likes) { $product.addClass('has-likes'); } else { $product.addClass('zero-likes'); } }); $('#overlay').show(); $('#dish-popup-container').show(); // Scroll to matched dish //$("a#scrolll").attr("href", "#" + $("li.matched").attr("id")); //$("a#scrolll").attr("href", "#" + $("li.matched").attr("id")); //$("a#scrolll").trigger("click"); $(".menu").scrollTo( $("li.matched").attr("id"), 800 ); // Hide dish results on mobile devices to prevent having a blank space at the bottom of the site if (Modernizr.mq('only screen and (max-width: 640px)')) { $('ol.results').hide(); } $(".close-dish-popup").click(function() { $("#overlay").hide(); $("#dish-popup-container").hide(); $('ol.results').show(); changeState({}, ['dish', 'place', 'serp']); }); showPopupMap(dict.place, "dish-popup-map"); } Any suggestion to fix this?

    Read the article

  • jQuery scroll on hover

    - by Happy
    HTML: <body> <div class="top-corner"></div> // absolute, top: 0 <div class="bottom-corner"></div> // absolute, bottom: 0 <a href="#" class="top-link">top</a> // fixed, top 50%, left 0 <a href="#" class="bottom-link">bottom</a> // fixed, top 60%, left 0 <div style="padding: 1500px 0;"></div> // for scroll test </body> Using scrollto plugin http://demos.flesler.com/jquery/scrollTo/ JS $(".top-link").hover(function(){ $("body").scrollTo($(".top-corner"), 3000); },function(){ // stop on unhover }); $(".bottom-link").hover(function(){ $("body").scrollTo($(".bottom-corner"), 3000); },function(){ // stop on unhover }); Animation works on hover. How to stop it on unhover? Thanks.

    Read the article

  • Fancybox force scroll to top

    - by Bradley Herman
    I'm using the jQuery Fancybox plugin to display some content on a website. Unfortunately, when a link is clicked, the lightbox that is loaded starts at the same scroll position as the previous one. I tried using self.scrollTo(0,0) $.scrollTo(0) $('#top').scrollTo(); and a few others methods to push it back to the top, but none have seemed to work. Any help on this?

    Read the article

  • Javascript/Jquery Super Scrollorama Navigation Issues

    - by Rosencruez
    On a Wordpress site I am currently working on, my client wanted the different sections of the front page to slide up from the bottom and cover up the previous section, like a wipe or slide transition. Using super scrollorama found here: http://johnpolacek.github.com/superscrollorama/, I managed to achieve the desired result. Next, I needed to create a navigation menu on the front page only. I did so, and set anchors at various different points on the pages. I also used the scrollTo library for scolling animations when I click the nav menu links. However, there are a number of problems I have encountered: When at the top and I click "showcase", it brings me down to the showcase section, but the products section (the div right after it) is overlapping it. Other divs seems to have the same problem of the following divs overlapping the current one I can only navigate forwards. When I try to go backwards, it won't (except for "Home") I thought it might have something to do with the CSS "top" property of the divs, so I tried resetting them every time the click function kicked in, but it didn't work. So I removed it for the time being. Currently set the javascript to prevent the default action of scrolling to the anchors and instead setting it to scroll to the actual divs themselves. However, I'm still having the same issues. Here is the site I am currently working on: http://breathe.simalam.ca/ Here is the javascript for the scrolling: $(document).ready(function() { jQuery('.home-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo(0, 1000, {queue:true}); }); jQuery('.showcase-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#showcase_content', 1000, {queue:true}); }); jQuery('.products-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#products_content', 1000, {queue:true}); }); jQuery('.about-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#about_content', 1000, {queue:true}); }); jQuery('.locator-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#locator_content', 1000, {queue:true}); }); jQuery('.contact-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#contact_content', 1000, {queue:true}); }); }); scrollorama code: $(document).ready(function() { $('#wrapper').css('display','block'); var controller = $.superscrollorama(); var pinDur = 4000; /* set duration of pin scroll in pixels */ // create animation timeline for pinned element var pinAnimations = new TimelineLite(); pinAnimations .append([ TweenMax.to($('#showcase'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#products'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#about'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#locator'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#contact'), .5, {css:{top:0}}) ], .5) .append(TweenMax.to($('#pin-frame-unpin'), .5, {css:{top:'100px'}})); controller.pin($('#examples-pin'), pinDur, { anim:pinAnimations, onPin: function() { $('#examples-pin').css('height','100%'); }, onUnpin: function() { $('#examples-pin').css('height','2000px'); } }); }); All of the section divs are inside a parent div. The section divs all have a height, width, and top of 100%. The parent div containing all of these section divs are as follows: #examples-pin { position: relative; /* relative positioning for transitions to work? */ width: 101%; /* max width */ height: 2000px; /* height of 2000px for now */ overflow: hidden; /* hide the overflow for transitions to work */ margin-bottom: -200px; /* negative bottom margin */ }

    Read the article

  • iPad javascript scrolling

    - by davids
    I'd like to get the same behaviour of the native javascript scrollTo function in iPad, just attaching a function to the swipe event and scrolling the content a specific number of pixels. That doesn't work in iPad using scrollTo or several different jquery plugins, like scrollTo or iScroll. I think I'm having problems because I'm working with an iframe, as I have another html document in it, with its body divided in columns, but I'm just showing the first one. The point of all this is that, after swiping, it should show the next/prev column, and I tried scrolling the iframe window or the inner's html body, which actually works in chrome, but it doesn't in iPad.

    Read the article

  • GWT Animation final value is not respected

    - by brad
    I have a FlowPanel that I'm trying to animate back and forth like an iphone nav. (See this post for my original question on how to do this) So I have it "working" with the code shown below. I say working in quotes because I'm finding that my final position of my scroller is not precise and always changes when scrolling. The GWT.log always says the actual values I'm looking for, so for instance with the call below to scrollTo, my GWT.log says: ScrollStart: 0 scrollStop: -246 But when I actually analyze the element in fireBug, its css, left position is never exactly -246px. Sometimes it's off by as much as 10px so my panel has just stopped scrolling before being finished. The worst part is that this nav animates back and forth, so subsequent clicks can really throw it off, and I need pixel perfect positioning otherwise the whole things looks off. I don't even know where to start with debugging this other than what I've already done. Any tips are appreciated. Code to call animation scroller = new Scroller(); scroller.scrollTo(-246,400); Animation Code public class Scroller extends Animation { private FlowPanel scroller; private final Element e; public Scroller(){ scroller = new FlowPanel(); e = scroller.getElement(); } public void scrollTo(int position, int milliseconds) { scrollStart = e.getOffsetLeft(); scrollStop = position; GWT.log("ScrollStart: " + scrollStart + " scrollStop: " + scrollStop); run(milliseconds); } @Override protected void onUpdate(double progress) { double position = scrollStart + (progress * (scrollStop - scrollStart)); e.getStyle().setLeft(position, Style.Unit.PX); } }

    Read the article

  • Why do Floatbox popups stop other animations when finished closing?

    - by isherwood
    I'm trying to essentially run a callback function when a Floatbox popup is closed via a hyperlink inside the popup. I want the page to scroll to the top and my login box to fade in. I'm using the following code: function showLogin() { jQuery('#header_no_theme_login_popup', parent.document.body).show(); window.parent.window.scrollTo(0,0); window.parent.fb.end(); } This works fine, but if I try to use jQuery fadeIn, the fade effect is truncated when the Floatbox popup finishes closing, leaving it with partial opacity. jQuery scrollTo doesn't seem to want to work at all. Thanks much.

    Read the article

  • iPhone UIScrollView - How to animate scrolling with steady contents?

    - by timbos
    Hi all, I'm wondering if anyone knows how to prevent the contents of a uiscrollview from moving unsteadily when scrolling manually by setting the content offset. When scrolling by touch the text remains clear and steady. I would like to recreate this by animating with the animated option set to false. I'm using a timer to scroll at a given interval. The text is being drawn to a view in the contents, but it vibrates and it becomes more difficult to read clearly when animating at a greater speed. The speed varies and the scrolling must respond to changes in speed quickly. Here's some code - - (void) scrollIncrAmt:(float) amt { _currentSpeedIncr = amt; NSArray* arr = [SharedTickerInfo sharedTickerInfo].sDataArray; DataObj* tdObj = [arr objectAtIndex:_row]; if ( ![tdObj isDirLeft] ) { amt = -amt; } float scrollTo = self.scrollView.contentOffset.x + amt; [scrollView setContentOffset:CGPointMake(scrollTo, 0.0f) animated:NO]; }

    Read the article

  • Why does the JavaScript need to start with ";" ?

    - by TK
    I have recently noticed that a lot of JavaScript files on the web starts with ; immediately following the comment section. For example, this jQuery plugin's code starts with /** * jQuery.ScrollTo * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 9/11/2008 .... skipping several lines for brevity... * * @desc Scroll on both axes, to different values * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); */ ;(function( $ ){ Why does the file needs to start with ;? I see this convention on server-side JavaScript files as well. What is an advantage and disadvantage of doing this?

    Read the article

  • External API function calls AS3 control timeline

    - by giles
    I have function problem using this code (below), the embedded flash movieclip disappears or completely prevents the scrollto.js query to function in DW cs3. Communication between Flash and JavaScript is without problems, it is the call back I can't find to work and more frustratingly, should be simple, as no values are not required. So far, this has been hours of scouring the net without a workable end in sight...ahrr. What is a function for this to work? JavaScript – to call Flash event from HTML button link, placed between head tags function callExternalInterface() var flashMovie = window.document.menu; flashMovie.menu_up(value); menu_up is the string. Does anyone know of workable function for callback?? HTML <div id="btn_up"><a href="#top" name="charDev" id="charDev" onclick="">top</a></div> Pane navigation div that uses Scrollto.js query, and it's this link I need calling back to the embedded "menubtns.swf" (nested in "AS3Menu_javascript.swf") to play 5 frames of this movieclip, via a JS function. Embedded .swf code, using swfobject.js with allowScriptAccess=always <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="menu"<br/> width="251" height="251" id="menu"> <param name="movie" value="../~Assets/Flash/AS3Menu_javascript.swf" /> <param name="allowScriptAccess" value="always" /> <param name="movie" value="ExternalInterfaceScript.swf" /> <param name="quality" value="high" /> <object type="application/x-shockwave-flash" data="../~Assets/Flash/AS3Menu_javascript.swf" width="250" height="250"> <p>Alternative content</p> </object> </object> AS3 / Flash import flash.external.ExternalInterface;flash.system.Security.allowDomain(/sourceDomain/); ExternalInterface.addCallBack("menu_up", this, resetmenu); function resetmenu(){ gotoAndPlay:("frame label" / "number") }

    Read the article

  • Been asked a dozen times, but no luck from what I've read. Prevent Anchor Jumping on page load

    - by jasenmp
    I'm currently working with WP theme that can be found here: sanjay.dmediastudios.com I'm currently using 'smooth scroll' on my page, I'm attempting to have the page smoothly scroll to the requested section when coming from an external link (for instance coming from the blog page takes you to sanjay.dmediastudios.com/#portfolio) from there I want the page to start at the top and THEN scroll to the portfolio section. What's happening is it briefly displays the 'portfolio section' (anchor jump) and THEN resets to the top and scrolls down. It's driving me nuts :(. Here is the code I'm using: Click function for smooth scroll: $(function() { $('.menu li a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $root.animate({ scrollTop: target.offset().top - 75 }, 800, 'swing'); return false; } } }); //end of click function }); The page load function: $(window).on("load", function() { if (location.hash) { // do the test straight away window.scrollTo(0, 0); // execute it straight away setTimeout(function() { window.scrollTo(0, 0); // run it a bit later also for browser compatibility }, 1); } var urlHash = window.location.href.split("#")[1]; if (urlHash && $('#' + urlHash).length) $('html,body').animate({ scrollTop: $('#' + urlHash).offset().top - 75 }, 800, 'swing'); }); Any help would be MUCH appreciated.

    Read the article

  • How to add ease to this, with jQuery Easing plugin.

    - by user1691441
    I've asked this question previously before, and had a bit of help, but my lack of jQuery skills still didn't accomplish the job. I was wondering if anyone else could help me out with this. I've tried adding easing: "easeIn" right after the duration section, but still didn't work for me. if anyone could help me out that would be wonderful. I'm using the jquery easing plugin $(function() { function scroll(direction) { var scroll, i, positions = [], here = $(window).scrollTop(), collection = $('.part'); collection.each(function() { positions.push(parseInt($(this).offset()['top'],10)); }); for(i = 0; i < positions.length; i++) { if (direction == 'next' && positions[i] > here) { scroll = collection.get(i); break; } if (direction == 'prev' && i > 0 && positions[i] >= here) { scroll = collection.get(i-1); break; } } if (scroll) { $.scrollTo(scroll, { duration: 350 }); } return false; } $("#next,#prev").click(function() { return scroll($(this).attr('id')); }); $(".scrolltoanchor").click(function() { $.scrollTo($($(this).attr("href")), { duration: 350 }); return false; }); });

    Read the article

  • jQuery UI Tabs Plugin Broke

    - by Warren J Thompson
    We are using the jquery ui tabs arrow plugin from this fiddle: http://jsfiddle.net/dECtZ/282/, but like many plugins, it breaks with the latest version of jQuery. We were able to get the csscur to work, but still get the following error in the jquery core (line 353): Uncaught TypeError: Cannot assign to read only property 'length' of function (e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)} Code is as follows: (function($, undefined) { if (!$.xui) { $.xui = {}; } var tabs = $.extend({}, $.ui.tabs.prototype), _super = { _create: tabs._create, _destroy: tabs._destroy, _update: tabs._update }; $.xui.tabs = $.extend(tabs, { options: $.extend({}, tabs.options, { scrollable: false, changeOnScroll: false, closable: false, resizable: false, resizeHandles: "e,s,se" }), _create: function() { var self = this, o = self.options; _super._create.apply(self); if (o.scrollable) { self.element.addClass("ui-tabs-scrollable"); var scrollContainer = $('<div class="ui-tabs-scroll-container"></div>').prependTo(this.element); self.header = $('<div class="ui-tabs-nav-scrollable ui-widget-header ui-corner-all"></div>').prependTo(scrollContainer); var nav = self.element.find(".ui-tabs-nav:first").removeClass("ui-widget-header ui-corner-all").appendTo(this.header); var arrowsNav = $('<ol class="ui-helper-reset ui-helper-clearfix ui-tabs-nav-arrows"></ol>').prependTo(self.element); var navPrev = $('<li class="ui-tabs-arrow-previous ui-state-default ui-corner-bl ui-corner-tl" title="Previous"><a href="#"><span class="ui-icon ui-icon-carat-1-w">Previous tab</span></a></li>').prependTo(arrowsNav).hide(), navNext = $('<li class="ui-tabs-arrow-next ui-state-default ui-corner-tr ui-corner-br" title="Next"><a href="#"><span class="ui-icon ui-icon-carat-1-e">Next tab</span></a></li>').appendTo(arrowsNav).hide(); var scrollTo = function(to, delay) { var navWidth = 0, arrowWidth = navPrev.outerWidth(), marginLeft = -(parseInt(nav.css("marginLeft"), 10)), hwidth = self.header.width(), newMargin = 0; nav.find("li").each(function() { navWidth += $(this).outerWidth(true); }); if (to instanceof $.Event) { } else { newMargin = marginLeft+to; if (newMargin > (navWidth-hwidth)) { newMargin = (navWidth-hwidth); } else if (newMargin < 0) { newMargin = 0; } nav.stop(true).animate({ marginLeft: -(newMargin) }, delay, function(){ $(window).trigger("resize.tabs"); }); } } var holdTimer = false; navPrev.add(navNext).bind({ "click": function(e) { var isNext = this === navNext[0]; e.preventDefault(); if (o.changeOnScroll) { self.select(self.options.selected + (isNext ? 1 : -1)); } else { if (!holdTimer) scrollTo(isNext ? 150 : -150, 250); } }, "mousedown": function(e){ if (!o.changeOnScroll) { var isNext = this === navNext[0], duration = 10, pos = 15, timer; if (holdTimer) clearTimeout(holdTimer); holdTimer = setTimeout(timer = function(){ scrollTo(isNext ? pos : -(pos), duration); holdTimer = setTimeout(arguments.callee, duration); }, 150); } }, "mouseup mouseout": function(e){ if (!o.changeOnScroll) { clearTimeout(holdTimer); holdTimer = false; nav.stop(); } } }); self.header.bind('mousewheel', function(e, d, dX, dY) { e.preventDefault(); if (d === -1) { navNext.click(); } else if (d === 1) { navPrev.click(); } }); $(window).bind("resize.tabs", function(e) { var navWidth = 0; var arrowWidth = navPrev.outerWidth(); nav.find("li").each(function() { navWidth += $(this).outerWidth(true); }); var marginLeft = -(parseInt(nav.css("marginLeft"), 10)), hwidth = self.header.width(); if (navWidth > (hwidth+marginLeft)) { self.header.addClass("ui-tabs-arrow-r"); navNext.show("fade"); if (marginLeft > 0) { self.header.addClass("ui-tabs-arrow-l"); navPrev.show("fade"); } else { self.header.removeClass("ui-tabs-arrow-l"); navPrev.hide("fade"); } } else { self.header.removeClass("ui-tabs-arrows ui-tabs-arrow-l"); navNext.hide("fade"); if (marginLeft > 0) { self.header.addClass("ui-tabs-arrow-l"); navPrev.show("fade"); } else { self.header.removeClass("ui-tabs-arrow-l"); navPrev.hide("fade"); } } }).trigger("resize.tabs"); arrowsNav.find("li").bind({ "mouseenter focus": function(e) { $(this).addClass("ui-state-hover"); }, "mouseleave blur": function(e) { $(this).removeClass("ui-state-hover"); } }); this.anchors.bind("click.tabs", function(){ var li = $(this).parent(), arrowWidth = navPrev.outerWidth(), width = li.outerWidth(true), hwidth = self.header.width(), pos = li.position().left, marginLeft = -(parseInt(nav.stop(true,true).css("marginLeft"),10)), newMargin = -1; if (li.index() === 0) { newMargin = 0; } else if ((pos+width) >= (hwidth+marginLeft)) { newMargin = pos-hwidth+width; if ((li.index()+1) < nav.find("li").length) { newMargin += arrowWidth; } } else if (pos < marginLeft) { newMargin = pos-arrowWidth; } if (newMargin > -1) { nav.animate({ marginLeft: -(newMargin) }, 250, function(){ $(window).trigger("resize.tabs"); }); } }); } return self; }, _update: function(){ console.log(arguments); _super._update.apply(this); } }); $.widget("xui.tabs", $.xui.tabs); })(jQuery); $(function() { $("#tabs").tabs({ scrollable: true, changeOnScroll: false, closable: true }); $("#switcher").themeswitcher(); });

    Read the article

  • How to scroll page to a custom location

    - by Rajat
    Hi, I am looking to scroll the page to a particular location.Something like this: function scrollTo(y){ document.body. some-property = y; } I am looking to solve this without using any libraries. I know scrollTop works in some browsers but I tried it if FF 3.6 and IE 8 and it doesn't work. Does anyone know how to complete that function ?

    Read the article

  • jquery skip list item

    - by steve
    Is there a way for a jQuery function to "skip" an li? Such as Having 3 list items, you click on the 1st one, it calls a next() function, and skips the 2nd li and goes to the 3rd. Current code is here: $('ul.gallery li').click(function() { $(window).scrollTo($(this).next('li'), 800, {easing:'easeOutCirc', axis:'x', offset:-50 } ); }); I want it to skip the immediate li and go to the one after that.

    Read the article

  • Scrolling in Webview Progmatically

    - by mindfreak
    Hello friends, I am having a webview which dispalys large amounbt of data. I want to scroll Webview progmatically. I know window.scrollto() method is there but ,god knows why, it is not working. Can anybody guide me step by step how to do this ? I am sure there is some minor problem. Pl. guide me.

    Read the article

  • A bookmarklet to scroll to the bottom of a webpage

    - by mathiregister
    hi guys, i wonder if it is possible to create a bookmarklet to click on and the current webpage scrolls to the bottom! javascript:function%20scrollme(){dh=document.body.scrollHeight;ch=document.body.clientHeight;if(dh>ch){moveme=dh-ch;window.scrollTo(0,moveme);}} if i create a new bookmark and paste this as address nothing happens. I actually have no idea how to run javascript within a bookmarklet, however i just bookmarked the css-tricks Printliminator maybe you could help, i would love to have a bookmarklet like this!

    Read the article

  • javascript: A bookmark to scroll to the bottom of a webpage?

    - by mathiregister
    hi guys, i wonder if it is possible to create a bookmarklet to click on and the current webpage scrolls to the bottom! javascript:function%20scrollme(){dh=document.body.scrollHeight;ch=document.body.clientHeight;if(dh>ch){moveme=dh-ch;window.scrollTo(0,moveme);}} if i create a new bookmark and paste this as address nothing happens. I actually have no idea how to run javascript within a bookmarklet, however i just bookmarked the css-tricks Printliminator maybe you could help, i would love to have a bookmarklet like this!

    Read the article

  • jQuery: Scroll down page a set increment (in pixels) on click?

    - by bcWeb
    I'm trying to make a page scroll down 150px from the current position when an element is clicked. So lets say you're roughly halfway scrolled down a page. You click this link, and it will slide you down an additional 150 pixels. Is this possible with jQuery? I've been looking at scrollTop and the scrollTo plugin, but I can't seem to connect the dots.

    Read the article

< Previous Page | 1 2 3  | Next Page >