JQuery :: Setting An Offset Of The LocalScroll-plugin (and The ScrollTo)?

Sep 8, 2010

I have problems setting an offset of the LocalScroll-plugin (and the ScrollTo)[URL]If you click on one of the links (main-section), you'll see the divs are not lining up right. I guess it's about scroll to goes to div+padding+margin. Right? So, I'll have to adjust an offset.

My code:

$(document).ready(function(){
$('#Main').localScroll({

[code]....

View 3 Replies


ADVERTISEMENT

Jquery ::.ScrollTo Plugin Not Working?

Sep 9, 2009

im trying to run .scrollto to jump from one div to the next with a smooth animation in a horizontal website. this is what the head tag looks like so far

<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery.scrollTo-1.4.2-min.js"></script>
<script src="scripts/jquery.localscroll-min.js" type="text/javascript"></script>

[code]....

i tried removing either local scroll or scrollTo and see if there was a conflict but that wasnt the case.
ive seen the script run on a webpage without having to add $.localScroll();to every link, right now it just doesn't move at all.

View 4 Replies View Related

JQuery :: ScrollTo Plugin And Target Focus?

Jun 1, 2010

I'm using the following script to successfully scroll links, however, I am having trouble getting the page to focus on the hash target. Instead, the page focus stays with the link that initiates the function rather than the intended target:

$(function(){
$('a[href*=#]').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){
var targetOffset = $target.offset().top;
$('html,body').animate({scrollTop: targetOffset}, 300);
$(this.hash).focus(); // Not working
return false;
}
}
});
});[code]....

I've tried using this.hash (as above) and it doesn't work, though I can set the focus to the top of the page like so (not what I want):
$('html,body').focus();

View 1 Replies View Related

JQuery :: ScrollTo Plugin: Prevent Tabbing Between Slides?

Jun 1, 2009

Does anyone know of a way to prevent tabbing (via keyboard tab key) between form fields in ifferent "slides" when using the jquery scrollTo plugin? For example, I have a UL with 2 LI's in it and each LI has a <form> inside of it. If a user is on slide 1 and hits tab on the last visible form field, the first form field on the next slide comes into view (because the browser gives it focus), thus moving slide 2 partially into view. The same kind of thing happens from slide 2 to slide 1 when shift-tabbing (tabbing backwards): a form field on slide 1 gets focused and comes into view. I'd like to prevent tabbing between the forms. To complicate matters a bit more (possibly), one of my forms has a jquery UI tab control on it, so the last visible form field could be any field on any of the tab control's tabs (ie: the "last" visible form field depends on what tab is showing.

View 3 Replies View Related

JQuery :: Implemented The ScrollTo And PrettyPhoto Plugin - Internet Explorer - Not Working

May 27, 2009

I'm sure this is a very trivial and probably simple thing to fix, but unfortunately I've run into a massive wall with it!

(Vague disclaimer - i'm new to Javascript and jquery, but learning slowly.)

I've implemented the scrollTo and prettyPhoto plugin on my websites, both work brilliantly on everything but Internet Explorer: [url]

I've used the following code to initialize the jquery:

I've followed instructions for both plugins pretty well down to the T, so i can't see where i've gone wrong here.

View 5 Replies View Related

ScrollTo Plugin Not Scrolling Div?

Jul 30, 2010

I am at a complete loss with this plugin, so I'm hoping someone here can help me. And if after reading my post, someone can come up with a better, less frustrating plugin, I would really appreciate it. The plug-in author's site is: [URL]... The gist of it is that I am making a website for a restaurant. They want the menu to horizontally scroll between the sections of food, and within each section, have a vertically scrollable (via scroll bar) text menu in two columns. When you click on the section in the nav menu, it's supposed to take you to that food section via horizontal animated scroll. The link below is the sample page I'm testing on, and an image is attached to show you the idea of what it's supposed to look like:[URL].. That is the sample page with the JQuery.ScrollTo plugin installed.When I shrink the page, it looks like the animation *is* working (by the window scroll bars moving), just not correctly, since it's not moving the divs.

Image of what each food section should look like: Maybe this is a case of me not having the divs set up correctly with CSS? I'm not sure, I've dug myself into a messy hole.

[Code]...

View 7 Replies View Related

JQuery :: LocalScroll : How To Make A Horizontal Website

Nov 10, 2011

i am trying to make a horizontal site using localScroll:[URL]when i click in a link from the fixed menu in the left, the box scrolls below the menu. It is possible to make the box appears entirely?

View 2 Replies View Related

Jquery :: Localscroll : Vertical And Horizontal Scrolling?

Sep 13, 2011

I have created the following page [URL] where I have a number of main links and then sublinks for these. At the moment when a main link is clicked the content scrolls vertically and when a sublink is clicked eg Blue Inner Link 1 the content slides horizontally. how can I update the script so that when I click a main link the content scrolls horizontally and when I click a sublink the content scrolls vertically?

View 1 Replies View Related

More Than One Target In LocalScroll?

Apr 11, 2011

Code:

jQuery(function( $ ){
$.localScroll.defaults.axis = 'x';
// Scroll initially if there's a hash (#something) in the url
$.localScroll.hash({

[code]....

I'm trying to target more than one DIV -#slider_content- so that I may have the sliding effect more than once on the same page.

View 4 Replies View Related

Jquery :: Set An Offset For The Footer

Jan 5, 2010

I'm using a script to display a floating menu. I don't know how to set an offset for the footer so that it does not go all the way to the bottom. I'd like a 100px margin to the bottom of the screen. Here's my code:

[Code]...

View 3 Replies View Related

JQuery :: Offset When Resizing Window?

Dec 13, 2011

I'm making a drop down box using offset so it's below the correct option, but if I resize the window, the dropdown box keeps the same offset as when the page was originally loaded.

View 3 Replies View Related

JQuery :: Get The Offset For Content Of The Transparent Image?

Feb 16, 2011

I am having an transparent image and that image having image content at the right most corner of the image. Is there any way to get the offset of the image content(Actual content of the image) in Jquery.

View 1 Replies View Related

JQuery :: Offset() Does Not Work In Chrome - Works In IE And FF

May 29, 2010

$().offset() does not return values on Chrome. Works well in IE and FF.

var element = r.circle(cx, cy, radius); // r.circle is from raphaeljs library.
var offset = $(element.node).offset();

Is there a work/fix around for this?

View 1 Replies View Related

JQuery :: ScrollTop: Offset().top Not Working In Firefox 4 Or IE 8?

Mar 25, 2011

I have this bit of jQuery:

$(document).ready(function() {
$('article').click(function(e) {
e.stopPropagation();

[code]....

It works in Chrome, but not Firefox or IE.[URL]

View 2 Replies View Related

JQuery :: Get Offset() To Work Correctly With Floated Elements?

Apr 2, 2010

I have a bunch of floated divs and I want to increment a variable every time they 'jump' to the next line. When I try using offset() for this I get the same top,left cords for every single element. Is there any way of getting the actual offset? (I get the same result in FF and Chrome)

View 2 Replies View Related

JQuery :: Offset() Returns Incorrect Values In IPad?

Apr 18, 2010

I think the offset() function returns node's position relative to document. The attached html file prints the offset value to console when the box is clicked. I expect the same value would be printed every times. However, when the script is run on iPad (with simulator), it print different value when I zoom and scroll to different position. This problem does not occurred in iPhone.

Attachments
test.html.gz
Size : 388 Bytes
Download : 505

View 9 Replies View Related

JQuery :: Position And Offset Function Not Working In Chrome

Sep 12, 2011

There is a long thread about this in the posiiton() reference page, but I am not finding a thread here in the forums, let alone a solution. I have some code that is trying to do calculations on the left and top attribute of child DOM elements. So, I have 5 divs (floated left, with width and height assigned), contained in another div. If I iterate over the 5 divs and call either position(), offset() or even css('left'), they always return 0. I have tried setting margin: 0px as well, but same result.

View 3 Replies View Related

JQuery :: Reading Offset().top & .height() After Div .animation() & .slideDown() Done?

Sep 19, 2010

I have the below code to calculate how tall a 3rd div needs to be. This code works except for one flaw. It always seems to read the previous .top and .height() values.As .annoucement-area-880 and .content-annoucement-bottom-880 are dynamic (two different types of accordions) they resize depending on what element gets clicked.One uses the .animate() method while the other .slideDown().I tried enclosing the below within a $(document).ready(function(){...}); but this doesn't help.In conclusion, below code works fine except it reports previous (aka old) values which in effect cause it to calculate an currently invalid height.

Code:
var div1 = $( ".annoucement-area-880.id1" );
var div1_offset = div1.offset();

[code]....

View 12 Replies View Related

JQuery :: Scrollto And End Of Scroll?

Oct 24, 2009

I have a div with an image in it that when clicked steps the page to the right by 600px

this is it:
.click(function(){
$.scrollTo( {top:'-=0px', left:'+=600px'}, 800 );
});

What i want to do is remove the button when the page cant scroll any further to the right. then re add it when i go left again. if this makes any sense!

View 1 Replies View Related

Jquery :: Get ScrollTo To Work ?

Jun 1, 2009

At Jquery and I'm trying to get ScrollTo to work. There is a lot of info at [url] but it's not geared toward absolute beginners (ie. there seams to be a lot of unsaid steps). I'm trying to make the queue effect work where the window scrolls both the x and y axes with custom duration (2000 or 700 etc.)

View 1 Replies View Related

JQuery :: ID Naming Conventions And $.scrollTo()?

Sep 17, 2009

I was peaking around on the W3C site to see if I could find a clear definition of which characters are allowed within an ID.The problem is that I have a series of divs that have id="aq-1234" "cd-456" etc. I have no real control over the - in the name. What would be another way of clearly identifying an object without the id? <td id="aq-1234"> is what I have now. I've not used the rel="xxx" that I see some people use. Would that be acceptable? Clearly $("#aq-1234") is not.

View 3 Replies View Related

JQuery :: Scrollto A Div Center On Any Screenresolution?

May 7, 2009

Is it possible to do align it from the centerOur function is like this [URL]but we would like to make it center on the screen.

View 1 Replies View Related

JQuery :: Add A Scrollto After A Show And A Few Other Simple Functions?

Aug 25, 2011

ill admit im extremely new to jquery i come from the flex/flash world and looking to see what the hype is allo about. with that being said. im trying to perform a simple screen scroll after all this code has run but nothing seems to work

[Code]...

View 2 Replies View Related

JQuery :: JScrollPane ScrollTo On Page Load?

Jan 6, 2010

I am using jScrollPane on this Wordpress-powered site [URL]... rporation/ at the right for the logo thumbnails. Now I want to use the [URL]..... ollTo.html functionality to vertically align the thumbnail of the current project so that people don't get lost in navigation. In other words: on page load, the jScrollPane should auto scroll to the thumbnail which belongs to that project. I've managed to give the current thumbnail a class called 'currentthunb'.

View 1 Replies View Related

JQuery :: ScrollTo - Contents Is Always In The Centre Of The Screen

Nov 4, 2010

I am making a side scrolling site and can get the jquery ScrollTo to work fine but I need to apply a targeted postion of 50% so that the contents is always in the centre of the screen. I am following this [url] but I do not know where to put the code for this "A string specifying a percentage to scroll to that part of the container (f.e: 50% goes to to the middle)."...which he has stated in a post is "$('#the_div').scrollTo('50%',900, {axis:'x'});" but I don't know where to place it.

View 3 Replies View Related

JQuery :: Two Fixed Nav's - Scrolling Between Divs Using ScrollTo

May 15, 2011

I currently have a webpage that scrolls between content divs with a little 'next' 'prev' next to each div them, it works fine but when you view on a larger res screen you see more than just one set of 'next' 'prev' which leads to confusion, I would like to have two fixed nav's that navigate between the parts of the page

View 2 Replies View Related







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