JQuery :: Animate BackgroundPosition Y-Axis = No Work

Sep 23, 2009

Some issues with jquery animate. im trying to create a navigation menu that apon mouseover, the background image animates with a negative y value. apon mouseout, the div will animate the background position back to zero. Simple enough ay? thats what i thought. When i roll over the divs with the bg image, they do not animate, it appears like a simple background change. in other words, there is no tween or movement, just ...new position.

INCLUDES

JQUERY

CSS

HTML

As i said, the animate property will not MOTION or TWEEn in the YAXIS, it will however as i tried animate in the XAXIS. got me stumped and at deadlock.

View 6 Replies


ADVERTISEMENT

JQuery :: BackgroundPosition - In IE8 - BackgroundColor Does Not Work ?

Nov 24, 2010

I need help with an IE8 problem. I want to give as many facts as possible.

Reference: [url]

I have already banned less than IE8 from my site but have the following problem with IE8 only (works on Mac and Win in these"allowed" browsers:Safari 5+, Chrome, FF 3.5+ and Opera 10+):

I use the backgroundPosition setter / getter extensively in this animation-extensive site.

But it breaks in IE8.

I did hack this as the only way I could get IE8 to work in a frame animation algorithm, noting that I have to test for browser and version (ugh) and then use this getter:

The following is an example that appears to work but seems unstable to me: (note that "accordionState"references an object within a data store attached to the "page" element):

There are many other cases where I have get or setbackgroundPosition,especially in the 'over' and out' functions where I use hoverIntent.

As a great fan and user of jQuery, I am puzzled that this will not work in IE8. Note thatbackgroundColor does not work either, although I do use UI to do these sorts of things and it seems to work in IE.

View 1 Replies View Related

JQuery :: BackgroundPosition Plugin - Both IE8 And FF3 Doesn't Seem To Work

Sep 24, 2009

Having some trouble with this plugin. I've tried in both IE8 and FF3, but it doesn't seem to work. Basically the background position isn't moving...the function toArray(strg) is suppose to return the following....return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]; this is the line where I'm getting an error code.

The values res[2] and res[4] are coming back as NaN. I'm not sure what these values represent, or why they are Null.

I'm calling the backgroundPosition like this:

My css reads:

View 1 Replies View Related

CSS A:hover Doesn't Work After JavaScript BackgroundPosition

Aug 28, 2007

I have a menu done in CSS. When you mouse over the menu i change the background position in order to display the 'hover' state. I'm using javascript to show/hide <div> when you click on a button to display proper content without reloading the page (Like a tab menu).

To display the menu in a 'hover' state when you have clicked, i use also javascript to move the background position so it stays on the hover state. But when i mouse over my other menu, they do not apply the CSS anymore.

Here is the JS i use on a 'onclick':

function menu()
{
document.getElementById('menu2').style.backgroundPosition = 'center 0'
document.getElementById('menu1').style.backgroundPosition = 'center -48px'
}

I guess it have something to do with the fact that i alter the CSS with the JS. But anyone know how to fix this without having to create my mouseover with JS and keep it in CSS?

View 3 Replies View Related

JQuery :: Animate With ScrollTop Does Not Work In IE

Feb 15, 2011

I am migrating a site from prototype/scriptaculous to jQuery, and I am encountering a lot of problems with animations in IE. I should start by asking that in scriptaculous, none of these animations require special CSS or tricks for IE (like getting rid of position absolute or anything like that), but this seems to be the case for almost every animation I do in jQuery - is there a list somewhere of all the little hacks and tricks people need to do to get these animations to work in IE? I have re-implemented a few hundred of these animations (mostly crossfades, sliding up and down, highlights), and not a single one worked in IE with the original CSS from the scriptaculous version (in most cases, the other browsers would). In most cases this has to do with absolute positioning. Is it possible jQuery 1.4.4 (the version I am working with) just has massive problems or something because my impression was this library was supposed to be easier to work with, not inordinately more difficult... I just find it hard to believe everyone else is having this many issues with it.

In any event, one thing I can't find any fix for anywhere, is animating the scrollTop of an element (NOT the whole page, which seems to be what everyone else wants to do). I have a div with overflow:hidden, and two buttons underneath which allow the user to scroll through the div (a real scrollbar in this context would not look good or be very useful in comparison).

I ported the code over from scriptaculous, and it works just fine in all normal browsers. Here is the version that would animate scrolling up:

Tested in Firefox/Chrome/Safari just fine right off the bat. But in IE, it just waits and then calls my callback, setting the scrollTop correctly at the end but not actually animating. It's not totally failing, in the sense that the scrolling does happen, and the callback does fire, but it should animate, and I don't really see any reason why it wouldn't. I have set position on the div and all wrapping divs to relative, and static, and set the display value, set the zoom value, widths, heights, everything, but this div will not animate as it scrolls at all in IE only (this is all IE's - 6, 7, and 8). I also tried isolating the div on its own page, removing nearly all the content (leaving text so it will have something to scroll through), practically no CSS outside of width, height, and overflow, and again - does not work in IE only (works in all other browsers without fail).

View 1 Replies View Related

JQuery :: Can't Get Animate Callback To Work

Sep 29, 2009

The animation works, but the callback function (alert) doesn't get called.[code]

View 2 Replies View Related

JQuery :: .animate({}) Doesnt Work With ZIndex?

Apr 10, 2011

Animate doesnt seem to work with zindex. I dont see anywhere this is mentioned on the animate() page.

$("#myelement").animate({zIndex: 10})
.animate({opacity: 1), 1000);

Opacity is affected but not zIndex. I can change zIndex the normal way though:

$("#myelement").css('zIndex', '10');

View 9 Replies View Related

JQuery :: Animate Method Does Not Work With Top CSS Property

Apr 6, 2011

I'm trying to move a div with the animate(); Method but doesn't work with the top css property
this is the method that I use
$('.btnControls').click(function(){
$(".itemContainer").animate({top:"200px"});
});
Which is the reason for doesn't work.?

View 2 Replies View Related

JQuery :: Cycle Plugin Does Not Work On Safari - Get The Banners At The Bottom To Animate

Aug 2, 2010

I've used this plugin before and it worked just fine on all browsers. But on this assignment, it does not work on Safari. [URL] I am trying to get the banners at the bottom to animate. I don't understand why its not working

View 2 Replies View Related

JQuery :: Animating BackgroundPosition In IE

Jan 4, 2011

I recently got very interested in jQuery and found my way into it but I'm now facing this problem where I can't animate the position of a background image in IE. I've tested it in Google Chrome, FireFox, Safari, Opera and Internet Explorer. It works in the first 4 browsers but not in IE and that is a pretty big problem since a lot of people are (still ) using IE, I think.

Here is the animation:

As I mentioned, it works in every major browser except for Internet Explorer.

View 1 Replies View Related

JQuery :: Rollover Getting Li BackgroundPosition

Sep 1, 2009

How do I return a lists background-image's backgroundPosition?

I am trying to achieve a navigation menu whereby, when the li element is rolled over a grey square moves under the li element.

Here is what I have done so far:

So when the li element is rolled over I want to be able to identify said li backgroundPosition and use that value to move the ul's background image.

I realise that this could be done simply by giving each li element a different class name then giving it a mouseover function, but this is for a dynamic Wordpress nav bar so each li element does not have a unique class name.

View 1 Replies View Related

JQuery :: Consuming Axis Web Service?

Oct 17, 2011

I deployed a WS using axis, and I want to find the easiest / best way to call it using jquery...

[Code]...

View 1 Replies View Related

JQuery :: Expanding DIV From Central Horizontal Axis

Jan 4, 2012

Is it possible to scale a div from a central horizontal axis so that it expands top and bottom rather than just 'slideup' or 'slidedown' from the top left hand corner?

View 2 Replies View Related

JQuery :: Change Backgroundposition To Window Width

Oct 1, 2009

$(function(){

Why this is not working...?

View 1 Replies View Related

JQuery :: Animate Onload - Cant Get The Scrollbar To Animate To 500px

May 16, 2011

I cant get the scrollbar to animate to 500px, onload.

Here is a link to my page...[url]

<script type="text/javascript">

View 5 Replies View Related

JQuery :: Animate Several Objects In The Animate Callback Function At Once?

Jun 2, 2010

I have a toggle animation which puts the area I want to show to the user in view, ones that animation has played I want to animate several other objects on the page. I have the code to animate one object by using the callback function in animate. But is it possible to animate several objects in the callback function?. this is the code I have so far

$(document).ready(function(){
$(".navigaat").toggle(function(){
$(".mover").animate({left: '0px' }, 'slow',"", function() { $(".blok").animate( { fontSize:"160px" } , 1000 )});

[code]....

View 4 Replies View Related

JQuery :: Ann: JqPlot 0.6.2 Released - Features - Rotated Axis Text - Vertical And Horizontal Bar Charts

Jun 1, 2009

jqPlot is an open source plotting plugin for jQuery. The 0.6.2 release adds many new features including:
Rotated axis text. Vertical and horizontal bar charts. Automatic trend line computation. Data point highlighting. Cursor tooltips showing data and grid position. And many other features.

The jqPlot homepage is at [url]

The downloads page is at [url]

The mailing list/Google group is at [url]

jqPlot is built from the ground up as an extensible and plugable plugin. Handling of data, drawing of plot elements, events, virtually everything is handled by a plugin. This means you can enhance or swap out core functionality without touching the core code.

View 1 Replies View Related

Rotate Div 180 On Y-axis?

Jul 27, 2010

I'm trying to rotate a div by 180 degrees on its Y-axis using javascript. It's triggered by a click event listener and needs to keep rotating the same way, 180 degrees, forever.

View 2 Replies View Related

Scroll-like Div That Follow The Height Or Y Axis Value Of Mouse

Nov 7, 2011

I was wondering how and I tried creating a div that is a child of a div with its same width, but the length of the entire page.So in a way it is like a scroll-bar except the user can not move down the page by holding the smaller inner div (square). The small square just moves down its container as the mouse moves down to The bottom of the page.but since The square inner div is in a container, with the same with, it can not and will not be able to move horizontally.

View 7 Replies View Related

JQuery :: .animate() Resets Before Animate?

Nov 19, 2011

I use the wonderful .animate() method to create a "parallax website". It's still in developpement, but you can see the result : www.ohnewgarden.fr My problem : When you are at the very right, the animate effect reset my left property before animating. Which is weird is that this "reset" is applied only to two layers, without any sense. I'm going crazy !

So if someone could help me, it will be very nice ! It's probably my code which is wrong, but I can't see the mistake.

[Code]...

I said for my defense, I have tried to remove .stop(), tried to change parameters of .stop(), tried to reset (like there) the left property with a .css() method, and I have also tried to animate with "+=" (like there), but nothing works. If you follow to the link I gave, you could see very easily by clicking on "Contact" and after animation by clicking on "Accueil".

View 2 Replies View Related

If One Or Either Of Variable Orbital Period Or Semi-Major Axis Is A Zero

Nov 16, 2009

I am having difficulties with my code and i've tried many ways to do everything from do while to if else statements. i've got everything in my code down but that pesky loop statement, and i'm trying to write my code where it says if one of either of variable Orbital Period or Semi-Major Axis is a zero, then it should use different way to read the inputed information.

View 3 Replies View Related

JQuery :: Animate Onto Screen Works, But Animate Off Screen Happens Instantaneously?

Dec 27, 2011

I have a div that has a negative top margin and a negative right margin. The right margin is because I want to have the div slide onto the page from the right. The top margin is because without it my page height is the height of the visible elements plus the height of the off-screen div.On a button click, I move the div down and then animate it onto the screen from the right. On button click again, I animate the div to the right, off the screen, and then move it up. I also toggle its width & padding so it will appear to grow/shrink as it moves on/off screen. At least that's what I am trying to do. The animation onto the screen looks good, but going off the screen, it appears to happen intantaneously, instead of animatedDoes anyone know how I can fix this?

$(".addPanels").live("click", function(){//now and in the future, show the add panels menu
var thisAddPanelsMenu = $(this).parent().prev(".addPanelsMenu");//get the addPanelsMenu
if(thisAddPanelsMenu.length) {//if the addPanelsMenu exists

[code]....

View 2 Replies View Related

JQuery :: Animate Between 2 Divs?

Dec 7, 2010

I have 2 divs, 1 is just off the screen to the left, and the other visible. the divs contain unordered lists. Now when i click on one of the 'li' list items i would like to slide div 1 to the left off screen and bring div 2 to the right on screen. so this is what i have done so far:

<script>
var swap =0;
$("(#cat)li:first").click(function(){
if(swap==0){
$("#cat").animate({"left": "-=150px"}, "slow");

[Code]..

View 4 Replies View Related

JQuery :: .animate Never Gets Triggered?

Jul 31, 2010

have this code: $('#showLayers').click(function()

[Code]...

If I add a alert inside the click(), and after the animate, that one is never triggered as well.

View 2 Replies View Related

JQuery :: Animate Not Working In IE?

May 4, 2010

I have a big problem, here is the sample of code:

<ul>
<li>
<a href="#"> <img src="#" /> </a>
<div class="info">

[Code]....

So, normaly the div.info element is with css: display:none; And there is displaying only "a" element. But i have a little code of jquery who makes the div.info element showup when the mouse over on the "li" element. And code is working as i expecting, but not in the IE.

var pic = $('ul li');
pic.hover(function(){
$('div.info', this).stop().animate({opacity:'0'}, 600, function(){

[Code]...

View 2 Replies View Related

JQuery :: Animate Only Working In IE?

Jan 31, 2010

This sure has me puzzled since it's usually the other way around. The script below, straight from a book, works in IE, but not in FF, Chrome, or Safari. Can anyone tell me what I'm not doing that would work in the Good browsers

[Code]...

View 3 Replies View Related







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