Multi
Multi
Simply put: Div id's and div classes
Topic Started: Thursday, 7. July 2011, 14:07 (374 Views)
Joe
Member Avatar
Hi.
When creating a script - and even for CSS, often times you'll come accross divs. So, when do you use a `#`, and when do you use a `.`? [bbc_code]$('div#omgdivid').remove();[/bbc_code] * Use a `#` for div `id`'s. [bbc_code]$('div.omgdivclass').remove();[/bbc_code] * Use a `.` for div `classes`'s.

Just for future reference, div `id`'s are meant to be used once on a page, while div `classes` are meant to be used multiple times (though they both operate in the same way, essentially).
Joe
Off
Profile
Quote
Top
 
jackie
Member Avatar
Level 10
Outline Documentations
G E N E R A L

Documentation accepted in to the General database

Quote:
 

[9:15:40 PM] Michael: penis is salty
[9:15:42 PM] Michael: with a bit of tang
[9:15:48 PM] Michael: :|
[9:15:53 PM] Cody: erm
[9:15:55 PM] Jackie Chen: uhm
[9:16:02 PM] Justin Bieber: ......
Off
Profile
Quote
Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Coding & Development · Next Topic »

Welcome Guest [Log In] [Register]
Outline Live
Loading..
Loading..