Jump to content

Is there a way to keep this JS in the head section?


Recommended Posts

Good morning :),


Is there a way to keep this JS in the head section? I'd like to keep all the IE6 stuff in the same block for simplicity. I have defer="defer" on it, and I thought it worked, but I was wrong. It doesn't work until the 2nd load of the page, or page refresh. So is there a way to write the JS so that it doesn't have to go below the elements using it? Thanks!



{ visibility: inherit; } Tabs
<br /><!--<br />* {<br />margin:0;<br />padding:0;<br />}<br />html {<br />overflow-y:scroll;<br />}<br />body {<br />font:100%/1.25 "Times New Roman", Times, serif, Arial;<br />background:#666;<br />}<br />#tabs {<br />width:520px;<br />margin:80px auto 0;<br />list-style:none;<br />background:#666;<br />}<br />#tabs a {<br />color:#000;<br />outline:0;<br />font-weight:bold;<br />text-decoration:underline;<br />}<br />#tabs a:active, #tabs a:focus, #tabs a:hover {<br />text-decoration:none;<br />}<br />#tabs p {<br />margin:0 0 10px;<br />font-weight:normal;<br />}<br />#tabs li {<br />background:#999;<br />border:1px solid #000;<br />float:left;<br />width:94px;<br />padding:4px 0;<br />margin:0 10px 0 0;<br />text-align:center;<br />cursor:pointer;<br />font-weight:bold;<br />}<br />#tabs li:hover {<br />background:#ccc;<br />border-bottom:0;<br />}<br />#tabs .last {<br />margin:0;<br />}<br />/* ------------- Hide/Show Div ------------ */<br />#tabs div {<br />position:relative;<br />top:5px;left:-1px;<br />display:none;<br />width:478px;<br />padding:20px;<br />border:1px solid #000;<br />border-top:0;<br />cursor:auto;<br />text-align:left;<br />background:#ccc;<br />}<br />#tabs li.two div {margin-left:-106px;}<br />#tabs li.three div {margin-left:-212px;}<br />#tabs li.four div {margin-left:-318px;}<br />#tabs li.five div {margin-left:-424px;}<br />#tabs li:hover div {display:block;}<br />--><br />

<ul id="tabs">
Choosing a quality childcare provider is one of the most important decisions a parent will ever make. It can also prove to be one of the most difficult decisions to make. We encourage families to be fully informed about their options. To choose child care wisely you need an awareness of what quality child care is, how to recognize it, and how to find it. To help you meet this challenge, we at Building Blocks Home Daycare offer parents with the following resources to help guide you. We urge parents to take advantage of the resources provided, by using the following helpful information when searching for a childcare provider; as each and every word herein was written with your child?s safety and happiness in mind, and with his or her best interests at heart. The following information is a complete and thorough step by step process to finding, eventually selecting, and keeping a quality family home daycare.
Diabetes, as it relates to blood sugar, has always captured my interest because of its direct effect on one?s body composition. Diabetes is the result of problems with the pancreatic hormone, insulin. Insulin controls the amount of glucose, otherwise known as sugar, in the blood and the rate at which glucose is absorbed into the cells. The cells need glucose to produce energy. In people with diabetes, glucose builds up in the bloodstream instead of being taken into and used by the cells, leading to abnormally high levels of glucose in the blood. Eventually, hyperglycemia (high blood sugar), leads to damaged blood vessels, which in turn may cause eye disease, heart disease, nerve damage in the limbs and internal organs, and kidney disease.
Hello! My name is Eric Watson and amoung other things I am a male model. I also built this website, so I am not just a "pretty face". And as you can see by my portfolio, I've been around the block as it were. Therefore, it's safe for you to assume that I know what I'm talking about when it comes to the world of modeling. My hope is that this article helps you on your journey to become a successful model, or at the very least, helps you navigate through it's merky waters!
Hmmm... male modeling, where should I begin? First I will assume those reading this are aspiring models themselves. Either that or you?re looking for information on how to further your carrier as a model. In this article I will try and explain what this vague subject of male modeling is, and what it is not. I will explain how I became a successful model, and I will suggest ways that will help you do the same. We will examine the do's-and-don'ts of this often superficial and shady world. We will also go over what you should expect and what you should not expect; be it your own success or your failed attempt. And lastly, I will briefly get in to what I enjoyed about modeling and what I didn't.
First let?s get into the attributes one must first have to even have a chance of being a model in the first place. Misconception number one: you have to be good looking - false! Sure it helps to be attractive, but it is not a necessity. A model can either be good looking, or equally as valuable if not more, unique looking! Or of course a combination of the two, like myself fore instance (just kidding, Ha Ha, He He). Misconception number two: you have to be tall - true and false! Modeling agencies, and clients alike, prefer their models to be between 6'0" and 6'2" and boast a 40 regular suit size. However with that said, there are plenty of exceptions to that rule as well...
Welcome, my name is Eric and I am the owner and landlord of this unique triplex located in the heart of beautiful Carlsbad, CA. I take great pride of ownership in my property, and I believe it shows.
If there happens to be a unit available at the time you are reading this, and you feel like you may be interested in taking a closer look, then great! Contact me and we can set-up a time to view the unit that works for you. If you like what you see, but there are no units currently available, you may place yourself on a waiting list by submiting your information via my contact form. Thank you very much, and I look forward to meeting with you!
Restless legs syndrome (RLS) otherwise known as the ?wiggly legs?, plagues thousands of people each and every night. Most of us have experienced this at least a couple times in our lifetime.You?re laying there in bed trying to go to sleep, but your legs have a completely different agenda - sound familiar? Your legs may feel wiggly, itchy, or a tickling sensation, and you may feel this overwhelming need to move them. This is Restless legs syndrome. Well, if you?re bothered by this problem and you?ve happened to have stumbled across this article, you?re in luck; I?m going to fix it for you! Or even if you don?t suffer from RLS, but you find that you have trouble sleeping for what ever reason, the following tips will work wonders for you as well!

Magnesium is a natural mineral found in lots of the foods we eat. Magnesium is what I rely on to give me my restful night's sleep. Simply put, magnesium relaxes muscles! (Note: therefore, if your muscles are relaxed your brain will follow. Equally, the opposite will usually hold true as well. If your brain is relaxed, your muscles will follow). Adversely, calcium contracts muscles. Therefore, when taking either it?s always a good idea to take them in conjunction with one another, and at a ratio of 2 to 1. That is, 2 parts calcium and 1 part magnesium. That?s why, when purchasing either of these minerals at the store you will usually find this ratio. It?s common to see them somewhere in the neighborhood of 500mg calcium to 250mg magnesium. I?ve been told by a nutritionist that you could actually give yourself a heart attack by taking too much of one and not the other over a long period of time (remember, your heart is a muscle too). I don?t know if this is true or not, but either way - don?t do that...

<br><div style="background:red;"> </div>

Edited by Eric
Link to comment
Share on other sites

Thanks Tim, although it doesn't seem to be working for me? Here is a small little test page. If you put this script at the bottom then it works in IE6.



{ visibility: inherit; } Test
<br /><!--<br />#tabs li {<br />background:#ccc;<br />float:left;<br />list-style:none;<br />margin:5px;<br />}<br />#tabs b {<br />position:absolute;<br />display:none;<br />width:100px;<br />top:10px;left:10px;<br />}<br />#tabs a:hover b {display:block;}<br />a:hover {visibility:visible;}<br />--><br />
<br />var as = document.getElementById('tabs').getElementsByTagName('a');<br />for (var i = 0, j = as.length; i < j; i++) {<br />  as[i].onmouseover = function() {<br />    this.childNodes[1].style.display = 'block';<br />    this.parentNode.style.height = this.childNodes[1].clientHeight + 'px';<br />  }<br />  as[i].onmouseout = function() {<br />    this.parentNode.style.height = '';<br />    this.childNodes[1].style.display = 'none';<br />  }<br />}<br />

<ul id="tabs">
Link1testtest test test test test test
Link2test test test test test test test test test test test test test test 

test test test test test test test test test test test test test test
<br><div style="clear:both;">I want this text to move down when the li grows to match the position 

absolute height of the hidden <b>? Thanks!</div>

Link to comment
Share on other sites

Sorry Eric, that's supposed to be window.onload


Also don't forget to close the function with a "}"


No problem, thank you! That works perfect now! So window onload says - don't run script until everything is loaded? And you have the function closed already in your example right? Thanks Tim! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...