Results tagged DOM
Someone asked me recently "How can make something on a page show and hide with a mouseover event using jQuery?". I looked at the jQuery documentation and quickly came up with this example and code. It turned out to be exactly what they were looking for.I looked at a few of the events and effects like the mouseover() and mouseout() functions but that seemed to be to much for something this simple. This was basically the same thing as using the css(hover) property, So there is was, listed right under the jQuery events docs, hover().
Try my working demo. Here.
I started with two items that I could hover over and out on to make sure I got that part working right. Here's the code I started with:
jQuery ready function and hover event:
What is the DOM? The DOM is an object oriented view of HTML documents. HUH?
An HTML page is a document, within that page exists tags such as:
<body></body>, <h2></h2>, <div></div>, <span></span>
These html tags could be referred to in a few ways, such as, tags, elements, or even objects. When working with or manipulating the dom you will mostly refer to the items as elements, like when using getElementById(). But when standing back and viewing you document in greater detail these elements represent more of a life as an object. If your familiar with OOP programming you will know and an object is related to another object as are it's attributes and so on. We refer to this as a hierarchy.
In an HTML document there are elements that are on top of other elements that cause the characteristics of that element. For instance:
An HTML page is a document, within that page exists tags such as:
<body></body>, <h2></h2>, <div></div>, <span></span>
These html tags could be referred to in a few ways, such as, tags, elements, or even objects. When working with or manipulating the dom you will mostly refer to the items as elements, like when using getElementById(). But when standing back and viewing you document in greater detail these elements represent more of a life as an object. If your familiar with OOP programming you will know and an object is related to another object as are it's attributes and so on. We refer to this as a hierarchy.
In an HTML document there are elements that are on top of other elements that cause the characteristics of that element. For instance:
More : DOM (Dominate Object Model).
There are Object properties and Standard properties for your DOM Elements. The properties listed below are your Standard Element properties.
className: Gets/sets the class name of your Element.
Syntax: object.className = className
Example:
className: Gets/sets the class name of your Element.
Syntax: object.className = className
Example:
<body id="myid" class="mystyle">
<script type="text/javascript">
x=document.getElementsByTagName('body')[0];
document.write("Body CSS class: " + x.className);
document.write("<br />");
document.write("An alternate way: ");
document.write(document.getElementById('myid').className);
</script>
More : DOM - Standard Properties.
2whoa.com - NEW!!
Home
jQuery
Javascript
Archives
MLB Wallpapers
NFL Wallpapers
NBA Wallpapers
NHL Wallpapers
Flames Wallpaper
Watch Live Games!
NHL
NBA
Soccer
NFL
and more..
BMW, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan,Volvo Volvo Volvo Honda, Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota
Volvo, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan,Volvo Volvo Volvo Honda, Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota
Home
jQuery
Javascript
Archives
MLB Wallpapers
NFL Wallpapers
NBA Wallpapers
NHL Wallpapers
Flames Wallpaper
Watch Live Games!
NHL
NBA
Soccer
NFL
and more..
BMW, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan,Volvo Volvo Volvo Honda, Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota
Volvo, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan,Volvo Volvo Volvo Honda, Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota


