|
-
May 12th, 2012, 12:45 PM
#1
[RESOLVED] Defining CSS and jQuery code inside body
Hi 
I was wondering would it be good to depict the CSS inside the body and also to use jQuery code after that(within the body), instead of it in the head portion.
SambaNeko once told me that(in one of my questions), it is better to define the CSS before applying jQuery code.
So in my case, I am defining the CSS in the body portion and just after that, I am coding the jQuery code inside the document ready state.
In jQuery, we can define multiple document ready states. But what would be the order of compilation. I mean, when the browser parses the page, would it first consider the head portion then finds all document ready states in jQuery even in the body, and then only consider the CSS code in the body ?
Or will it be sequential ? 
This seems to be stupid question. But I am confused !
In my project, I have separated all common CSS and jQuery code to separate files and link them in the head portion of the common header file. But in subsequent inner pages, the CSS and jQuery code would vary. And I don't want to create confusion by defining the CSS of these pages in the common CSS file, or in a separate file and attaching it. Because it is hard to keep track of the class/id names.
But defining them inside these pages is lot more easier and convenient to me atleast.
What do you guys think ?
Thanks in advance
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|