diff options
author | Kyle K <kylek389@gmail.com> | 2013-06-15 19:52:17 -0500 |
---|---|---|
committer | Kyle Kaminski <kyle@kkaminsk.com> | 2013-06-15 19:52:17 -0500 |
commit | f5f461aaf9f08951fa3990e49b51a076f7036b16 (patch) | |
tree | deaf01c5633ef17b885d00546e7ea085ab1d1652 /jquery-css-addclass.xhtml | |
download | websandbox-f5f461aaf9f08951fa3990e49b51a076f7036b16.tar.gz websandbox-f5f461aaf9f08951fa3990e49b51a076f7036b16.tar.bz2 websandbox-f5f461aaf9f08951fa3990e49b51a076f7036b16.zip |
initial commit
Diffstat (limited to 'jquery-css-addclass.xhtml')
-rw-r--r-- | jquery-css-addclass.xhtml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/jquery-css-addclass.xhtml b/jquery-css-addclass.xhtml new file mode 100644 index 0000000..e92bd91 --- /dev/null +++ b/jquery-css-addclass.xhtml @@ -0,0 +1,25 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>append css class to a selector</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<style type="text/css"> + .p_background { + background-color: cyan; + } +</style> +<script type="text/javascript" src="jquery-2.0.2.js"></script> +<script type="text/javascript"> + <![CDATA[ + $("document").ready(function() { + $("p:last").addClass("p_background"); + }); + ]]> +</script> +</head> +<body> +<p id="pmain">goodbye, world!</p> +</body> +</html> + |