Created
August 3, 2012 02:12
-
-
Save nathanchen/3243528 to your computer and use it in GitHub Desktop.
jQuery - Change Text color and background color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(':button').click(function () { | |
| $('p').css('background-color', '#000').css('color', '#fff'); | |
| }); |
hello
its not working
try :
$('p').attr('style','background-color:#000;color:#fff');
*** it's work for me.
please try this :::: $('p').css('background-color', 'red');
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sai