Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 10-07-2010, 04:38 PM
imadam's Avatar
imadam imadam is offline
Contributing Member
Join Date: 12-06-09
Location: guildford
Posts: 355
iTrader: 0 / 0%
simple jquery help needed - run script at docu ready

i need some help with a script that currently runs on click that i now want to run on document ready.

this is what i have...

$(document).ready(function () { $( "#chatButton" ).toggle( function() { $( "#sideChat" ).delay(1000).animate({ backgroundColor: "#bc1b20", color: "#fff" }, 5000 ); }, function() { $( "#sideChat" ).animate({ backgroundColor: "#71969f", color: "#fff" }, 5000 ); } ); });
sure it's very simple i just can't figure it out.

Reply With Quote



Old 11-05-2010, 02:18 AM
WebsterBoy WebsterBoy is offline
Junior Member
Join Date: 11-01-10
Posts: 20
iTrader: 0 / 0%
Jquery animate on document load

Hello, not sure if you have solved this yet. Here is one way:
HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#sideChat").animate({ backgroundColor: '#bc1b20', color: '#fff'}, 5000); }); </script> </head> <body> <div id="sideChat" style="width:100px; height:100px;">The is the area that is being animated</div> </body> </html>

Last edited by HTMLBasicTutor; 11-05-2010 at 01:29 PM.
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Adsense-Ready Minisite Templates PACK lowco2525 Templates and Themes 0 06-29-2009 06:54 PM
Very simple layout needed x360 Coding Forum 3 10-28-2007 12:54 PM
A simple listing code in PHP needed sixty6 Coding Forum 4 03-19-2006 04:13 PM
VERY SIMPLE php /mysql script needed. will pay craigj Coding Forum 1 01-05-2004 09:00 PM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 03:31 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC