javascript - jQuery animate problems -


I use the following snippet to create the background light of an element, then gradually for more than 30 seconds Fade:

$ ("#" + post.Id). CSS ("background-color", "light blue"). Value ({background color: "white"}, 30000);

Two questions

First of all, instead of being white, is there a way to fade the ambiguity up to 100%? In this way I do not need to change "white" if I choose to change the background color of the page?

Second, once every 10 or 15 times, the background light blade stays and fails white. I am using the latest version of jQuery and the UI core. What could be wrong?

Edit: Bounty is the solution to the problem in relation to the second question.

EDIT2:

Obviously I had to go into oblivion because I said that I was able to solve my solution but did not show it to him. My mistake. I did not want to promote myself My code works 100% time and does not require jQuery. A display and code can be found here:

Your second question for : This is usually in my experience because there is a Javascript error somewhere else on the page. After having a javascript exception, the rest of the page is running javascript. Try installing (if you do not have it already), open and enable the "console" tab then any JavaScript errors or exceptions will be printed in the console.

One more thing to try (which just rejects my final statement ...) is to disable all your browser plug-ins, to see if you revive You can. Sometimes they interfere with the scripts on the page (especially the greasmoki.)

If you can provide a sample HTML snippet that resets this animation problem, it will To be very easy to help. I have pasted the script below, I can click it all day, like fast or slow, as much as I like, and it never fails to animate me.


Questions for the first : I know you said that you have found an alternative solution, but for me the following works (even IE6 Even though) I thought I would post it because it could be different from what you were thinking. (Note that CSS "property" works on IE through jQuery.css () , while IE does not directly support "ambiguity" property in CSS.)

  & lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; Body {background color: # 08f; } #Test {background color: white; Width: 100px; } & Lt; / Style & gt; & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var myOpacity = 0.125; $ (Function () {$ ('# test'). CSS ('opacity', myopicity); $ ('a'). Click (function () {myOpacity = 1.0 - myOpacity; $ ('# test') Chetan ({opacity: myOpacity}); return false;});}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; & Lt; A href = "#" & gt; Click me & lt; / A & gt; & Lt; / P & gt; & Lt; Div id = "test" & gt; Test & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -