Make elements on website stop scrolling when a specific point is reached, content underneath

I am building a mobile website for a client, this is a test page:
http://www.bbdesign.com/lhp/mvi.htm

The top section (including photo, headline, logo and the two brown buttons), is marked up like this:

<h3>AUTO, MOTORCYCLE<br />
	&amp; TRUCK ACCIDENTS<br />
	CAN RUIN LIVES. WE'LL<br />
	HELP YOU RECOVER.</h3>

<img class="topimg" src="img/ph_mvi1.jpg" alt="" border="0" />

<a href="http://www.bbdesign.com/lhp"><img class="logo" src="img/lg_lhp.jpg" alt="Liever Hyman Potter" border="0" /></a>

<ul class="dark floatleft">
	<li><a href="tel:6103706682"><img src="img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li>
	<li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>
</ul>

Open in new window


Everything is working fine. However, now client asks:

"Can we have it so that when you scroll down, once the top of the logo hits the top of your screen, the logo and two brown buttons stop scrolling (so they are always visible), and the content flows underneath?"

I know how to fix content to the screen (position:fixed), but not sure how to do what they are asking, if it is possible or realistic. Do I need to use Javascript to modify the CSS only when a certain scroll point is reached? Can that even be done accurately if the user does a very quick swipe to scroll?

Then, I assume if they scroll back up, they want the photo to reappear, so all of this needs to work in reverse as well.

I'm looking for some conceptual ideas here... would appreciate any input. Thank you!
Brad BansnerWeb DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
You will need to put the two elements, the logo and the two brown buttons in a wrapper. Then you can use jQuery to monitor the scroll position. When the scroll position equals or is greater than the top image height, change the css for the wrapper to position fixed.

Here's a mock up. I called the wrapper #topmenu and the script is at the bottom:
<!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->

<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->

<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->

<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Motor Vehicle Injury</title>

<meta name="description" content="Personal Injury Reading PA: Liever, Hyman & Potter, the Reading PA law firm, has been a leader in personal injury, car accident, truck accident and medical malpractice law.">

<meta name="viewport" content="width=device-width">

<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700">

<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:700">

<link rel="stylesheet" href="http://www.bbdesign.com/lhp/css/normalize.css">

<link rel="stylesheet" href="http://www.bbdesign.com/lhp/css/main.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<script src="http://www.bbdesign.com/lhp/js/vendor/modernizr-2.6.1.min.js"></script>

</head>

<body>



<h3>AUTO, MOTORCYCLE<br />

	&amp; TRUCK ACCIDENTS<br />

	CAN RUIN LIVES. WE'LL<br />

	HELP YOU RECOVER.</h3>



<img class="topimg" src="http://www.bbdesign.com/lhp/img/ph_mvi1.jpg" alt="" border="0" />

<div style="width:100%;height:102px" id="topmenu">

<a href="http://www.bbdesign.com/lhp"><img class="logo" src="http://www.bbdesign.com/lhp/img/lg_lhp.jpg" alt="Liever Hyman Potter" border="0" /></a>



<ul class="dark floatleft">

	<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li>

	<li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

</ul>

</div>

<ul class="light">

	<li><a id="main-mvi1" class="link" href="javascript:void(0)">AUTO ACCIDENTS</a></li>

	<li><a id="main-mvi2" class="link" href="javascript:void(0)">TRUCK ACCIDENTS</a></li>

	<li><a id="main-mvi3" class="link" href="javascript:void(0)">MOTORCYCLE ACCIDENTS</a></li>

	<li><a id="main-mvi4" class="link" href="javascript:void(0)">ACCIDENT FAQs</a></li>

	<li><a href="http://www.bbdesign.com/lhp/aas.htm">AWARDS &amp; SETTLEMENTS</a></li>

	<li><a href="http://www.bbdesign.com/lhp/videos.htm">VIEW OUR VIDEOS</a></li>

	<li><a href="http://www.bbdesign.com/lhp/default.htm">RETURN TO HOMEPAGE</a></li>

</ul>



<ul class="dark">

	<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li>

	<li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

	<li><a href="https://maps.google.com/maps?q=50+N.+5th+Street,+Reading,+PA+19601&hl=en&ll=40.336445,-75.927855&spn=0.010443,0.010182&sll=41.117935,-77.604698&sspn=10.56453,10.426025&t=m&hnear=50+5th+St,+Reading,+Pennsylvania+19601&z=17" target="_blank"><img src="img/mb_directions.png" alt="Directions" border="0" />Directions</a></li>

</ul>



<p class="copyright">Liever Hyman &amp; Potter, <span class="smaller">PC</span> - &copy; 2013</p>



<div id="mvi1" class="subpage">

	<a class="closesubpage" href="javascript:void(0)"><img class="grx" src="http://www.bbdesign.com/lhp/img/gr_x.jpg" alt="" border="0" /></a>



	<ul class="light plain">

		<li><a class="hl closesubpage" href="javascript:void(0)">AUTO ACCIDENTS</a></li>

		<li>

			<h3>ACCIDENTS CAN<br />

				RUIN LIVES. THE<br />

				EFFECTS CAN BE<br />

				DEVASTATING.</h3>



			<img class="topimg" src="http://www.bbdesign.com/lhp/img/ph_mvi2.jpg" alt="" border="0" />

		</li>

	</ul>



	<ul class="dark clearfix popup">

		<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li><li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

	</ul>



	<ul class="light">

		<li><a class="jumptoaas" href="javascript:void(0)">AWARDS &amp; SETTLEMENTS</a></li>

	</ul>



	<h1>AUTO ACCIDENTS</h1>



	<p>Accidents can ruin lives. The cost of medical treatment, the pain and suffering, the medical complications, the loss of income &mdash; the effects can be devastating. That's why there are laws in place to help victims and their families put the pieces of their lives and future back together as much as possible. Whether you or a family member were seriously injured while driving a car or other vehicle, as a passenger, or by a vehicle while walking or bicycling, it is important to contact an attorney as soon as possible. In Pennsylvania, certain rights of accident victims are time-sensitive, and can be lost if not acted upon quickly. If your injuries were the result of another car driver's negligence, our job will be to prove it and to get you the maximum award or settlement. To build your case we might add professional investigators, photographers, engineers (to perform accident reconstructions) and other experts to our legal team. In a number of cases we've found the blame to be far-reaching, and might include PennDOT or municipalities responsible for highway maintenance and design or liquor sellers if there is drunk driving.</p>



	<p>We've won numerous awards and settlements for victims of car or other vehicle accidents, which occur in the Reading, Berks County, and Pottsville, Schuylkill County, PA areas, as well as all areas of Eastern and Central PA, including many multi-million dollar ones. You'll pay us no money &mdash; not a cent &mdash; until we recover money for you, after which our contingent fee will be based on a percentage of the award or settlement that will be clearly defined in the initial agreement to represent you. Unlike other law firms, our agreement says that you will <span class="smallcaps">not</span> have to repay any of the expenses that we may have advanced on your behalf unless we recover money for you.</p>



	<p>Call us toll free in Philadelphia and all other areas of PA at 800.471.4691.</p>



	<h1 class="aas">AWARDS &amp; SETTLEMENTS</h1>



	<p class="red">Drunk Driving Case Settled for $2.5 Million</p>



	<p>A woman who was seriously injured when her vehicle was struck by a drunken driver has won a settlement of $2.5 million. The victim, a middle aged woman, was driving home from work at night when the vehicle operated by an underage intoxicated driver swerved into her path. The woman was life-flighted to a hospital where she was treated for multiple serious injuries, and subsequently required several surgeries, including a joint replacement. She was represented by the Berks County, PA law firm of Liever, Hyman &amp; Potter, who brought suit against the underage drunk driver and the restaurant that was responsible for serving her. Including future payments, the settlement is expected to total more than $2,575,000.</p>



	<p class="red">Nearly $1.5 Million Recovered for Accident Victim</p>



	<p>A settlement of $1,450,000 has been recovered for a single mother whose car was struck by a bus. The young woman was waiting for traffic to clear in order to turn left into a parking lot. A large commercial bus traveling behind her failed to stop and swerved into the oncoming lane as the woman began her turn. The collision resulted in a serious head injury and multiple fractures. The victim was life-flighted by rescue helicopter to the nearest trauma hospital. After an extensive hospitalization, she was transferred home where she was immobilized in a hospital bed and required in-home health care, physical and occupational therapy.</p>



	<p class="red">Victim of Truck Collision Recovers $1.2 Million</p>



	<p>The insurer for the driver of a truck that swerved to avoid rear-ending a school bus and collided with another vehicle has paid 1.2 million for the serious injuries suffered by the other driver. An investigation by the victim's attorneys at Liever, Hyman &amp; Potter determined that the truck driver was following the bus too closely. A trucking expert who was retained by the law firm was prepared to testify that if the driver had kept a proper distance between his truck and the bus, he could have brought his truck to a stop without hitting the bus and without crossing the centerline.</p>



	<p class="red">$1,040,000 Recovered for Brain Injury Resulting from Motorcycle Accident at Dangerous Intersection</p>



	<p>A man was riding his motorcycle to a local bank on a Saturday morning, when he was struck by an auto that pulled out from a stop sign at a dangerous intersection. Our client, who was a factory worker, suffered brain injury. The $1,040,000 settlement we won for him included the maximum that could be collected from the state, as well as from the municipality, as a result of improper highway design. We also obtained the policy limit for vehicle driver's negligent operation.</p>



	<p class="red">$1.4M Settlement for Roadway Defect, Fatal Auto Crash</p>



	<p>The family of a passenger killed in a one-vehicle accident has received a settlement totally $1,400,000 from the Pennsylvania Highway Department, the driver's insurance and the family's own underinsured motorist coverage. According to attorneys at Liever, Hyman &amp; Potter, "the car was driving down a steep hill on a state roadway when the driver allowed her vehicle to edge off the road surface to the right. There was a drop off and no berm. When she tried to correct her steering she lost control, went across the roadway and crashed in a ditch."</p>



	<p>LH&amp;P represented the estate of a deceased passenger against the driver and the Highway Department responsible for roadway design and maintenance.</p>



	<p class="red">Reading Intersection Accident Settled for $1.28 Million</p>



	<p>Reading, PA &mdash; A $1,280,000 settlement has been reached in favor of a retired man seriously injured in an auto accident at a city intersection. The victim, who was represented by the law firm of Liever, Hyman &amp; Potter, sustained injuries to his spleen, liver, ribs and left occipital bone when another vehicle ran a red light during a rain storm. He required tracheostomy and ventilation during recovery, which delayed speech therapy. He also suffered constant pain and sleep disruption as a result of fragments from the fracture of eleven ribs.</p>



	<p>The settlement included the entire available bodily injury coverage of $1,250,000, plus the maximum $30,000 in underinsured motorist coverage.</p>



	<p class="red">Over $1.2 Million Recovered for Head Injury Victim in Accident</p>



	<p>On the way to work, a client was waiting for traffic to clear in order to turn left into a parking lot. A large commercial vehicle traveling behind the our client's car failed to stop and swerved into the oncoming lane as our client attempted her turn. The terrible crash resulted in massive injuries including multiple fractures and a head injury. Settlement exceeded $1,200,000.</p>



	<p class="red">Attorneys Counter Defense Argument of Illegal Passing, Obtain $560,000+ Settlement for Injured Motorcyclist</p>



	<p>A pickup truck and motorcycle collision has resulted in a total liability and underinsured recovery of $562,600.</p>



	<p>The pickup truck was stopped at the intersection and signaling a left turn when the driver of the truck observed an acquaintance in a parking lot to his right and began to turn right towards the lot, instead of left. In doing so, the pickup struck the cyclist who was passing on the paved shoulder on that side of the vehicle. The motorcyclist suffered a head injury.</p>



	<p>According to the motorcyclist's attorneys at Liever, Hyman &amp; Potter, "the defense argued that our client illegally passed on the right and was responsible for the accident. We were able to show that the applicable statute permits passing a turning vehicle on the right so long as you remain on the paved road surface or shoulder. Our client at all times was on the paved shoulder and was therefore not himself negligent."</p>



	<p class="red">Cross-Over Accident Results in $900,000 Settlement</p>



	<p>A 49-year-old unemployed laborer suffered multiple injuries when a beer truck crossed the center line and struck his vehicle. The insurer for the beer distributor paid $900,000 to compensate our client for his injuries.</p>



	<p><a class="subpagetop" href="javascript:void(0)">RETURN TO TOP</a></p>

</div>



<div id="mvi2" class="subpage">

	<a class="closesubpage" href="javascript:void(0)"><img class="grx" src="img/gr_x.jpg" alt="" border="0" /></a>



	<ul class="light plain">

		<li><a class="hl closesubpage" href="javascript:void(0)">TRUCK ACCIDENTS</a></li>

		<li>

			<h3>TRUCK ACCIDENTS<br />

				ARE COMPLEX CASES.<br />

				WE CAN HELP.</h3>



			<img class="topimg" src="http://www.bbdesign.com/lhp/img/ph_mvi3.jpg" alt="" border="0" />

		</li>

	</ul>

	<ul class="dark clearfix popup">

		<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li><li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

	</ul>





	<ul class="light">

		<li><a class="jumptoaas" href="javascript:void(0)">AWARDS &amp; SETTLEMENTS</a></li>

	</ul>



	<h1>TRUCK ACCIDENTS</h1>



	<p>Heavy truck, bus and other commercial traffic is a fact of life on I-78, I-81, the Pennsylvania Turnpike, Route 222, Route 422, and the other state and interstate highways that cross Berks or Schuylkill County. All too often, it is also a factor in serious and fatal accidents, especially when drivers don't follow speed limits, laws requiring mandatory sleep breaks, or regulations to prevent oversized loads.</p>



	<p>If you or a family member has been in an accident involving a tractor-trailer or other commercial vehicle, you will probably be contacted by their insurance adjuster and/or trucking company. They might try to convince you that the accident was your fault or try to get a statement from you that they might be able to use against you. This is why it is important to contact Liever, Hyman &amp; Potter as soon as possible. One of our experienced lawyers will be immediately available to protect your case, guide you through the entire process, and will deal directly with the insurance companies.</p>



	<p>We've won numerous awards and settlements for victims of vehicle accidents, including many multi-million dollar ones. You'll pay us no money &mdash; not a cent &mdash; until we recover money for you, after which our contingent fee will be based on a percentage of the award or settlement that will be clearly defined in the initial agreement to represent you. Unlike most other law firms, our agreement says that you will <span class="smallcaps">not</span> have to repay any of the expenses that we may have advanced on your behalf unless we recover money for you.</p>



	<p>While our office is located in Reading, PA, you can call us toll free in Philadelphia or all other areas of PA at 800.471.4691.</p>



	<h1 class="aas">AWARDS &amp; SETTLEMENTS</h1>



	<p class="red">Drunk Driving Case Settled for $2.5 Million</p>



	<p>A woman who was seriously injured when her vehicle was struck by a drunken driver has won a settlement of $2.5 million. The victim, a middle aged woman, was driving home from work at night when the vehicle operated by an underage intoxicated driver swerved into her path. The woman was life-flighted to a hospital where she was treated for multiple serious injuries, and subsequently required several surgeries, including a joint replacement. She was represented by the Berks County, PA law firm of Liever, Hyman &amp; Potter, who brought suit against the underage drunk driver and the restaurant that was responsible for serving her. Including future payments, the settlement is expected to total more than $2,575,000.</p>



	<p class="red">Nearly $1.5 Million Recovered for Accident Victim</p>



	<p>A settlement of $1,450,000 has been recovered for a single mother whose car was struck by a bus. The young woman was waiting for traffic to clear in order to turn left into a parking lot. A large commercial bus traveling behind her failed to stop and swerved into the oncoming lane as the woman began her turn. The collision resulted in a serious head injury and multiple fractures. The victim was life-flighted by rescue helicopter to the nearest trauma hospital. After an extensive hospitalization, she was transferred home where she was immobilized in a hospital bed and required in-home health care, physical and occupational therapy.</p>



	<p class="red">Victim of Truck Collision Recovers $1.2 Million</p>



	<p>The insurer for the driver of a truck that swerved to avoid rear-ending a school bus and collided with another vehicle has paid 1.2 million for the serious injuries suffered by the other driver. An investigation by the victim's attorneys at Liever, Hyman &amp; Potter determined that the truck driver was following the bus too closely. A trucking expert who was retained by the law firm was prepared to testify that if the driver had kept a proper distance between his truck and the bus, he could have brought his truck to a stop without hitting the bus and without crossing the centerline.</p>



	<p class="red">$1,040,000 Recovered for Brain Injury Resulting from Motorcycle Accident at Dangerous Intersection</p>



	<p>A man was riding his motorcycle to a local bank on a Saturday morning, when he was struck by an auto that pulled out from a stop sign at a dangerous intersection. Our client, who was a factory worker, suffered brain injury. The $1,040,000 settlement we won for him included the maximum that could be collected from the state, as well as from the municipality, as a result of improper highway design. We also obtained the policy limit for vehicle driver's negligent operation.</p>



	<p class="red">$1.4M Settlement for Roadway Defect, Fatal Auto Crash</p>



	<p>The family of a passenger killed in a one-vehicle accident has received a settlement totally $1,400,000 from the Pennsylvania Highway Department, the driver's insurance and the family's own underinsured motorist coverage. According to attorneys at Liever, Hyman &amp; Potter, "the car was driving down a steep hill on a state roadway when the driver allowed her vehicle to edge off the road surface to the right. There was a drop off and no berm. When she tried to correct her steering she lost control, went across the roadway and crashed in a ditch."</p>



	<p>LH&amp;P represented the estate of a deceased passenger against the driver and the Highway Department responsible for roadway design and maintenance.</p>



	<p class="red">Reading Intersection Accident Settled for $1.28 Million</p>



	<p>Reading, PA &mdash; A $1,280,000 settlement has been reached in favor of a retired man seriously injured in an auto accident at a city intersection. The victim, who was represented by the law firm of Liever, Hyman &amp; Potter, sustained injuries to his spleen, liver, ribs and left occipital bone when another vehicle ran a red light during a rain storm. He required tracheostomy and ventilation during recovery, which delayed speech therapy. He also suffered constant pain and sleep disruption as a result of fragments from the fracture of eleven ribs.</p>



	<p>The settlement included the entire available bodily injury coverage of $1,250,000, plus the maximum $30,000 in underinsured motorist coverage.</p>



	<p class="red">Over $1.2 Million Recovered for Head Injury Victim in Accident</p>



	<p>On the way to work, a client was waiting for traffic to clear in order to turn left into a parking lot. A large commercial vehicle traveling behind the our client's car failed to stop and swerved into the oncoming lane as our client attempted her turn. The terrible crash resulted in massive injuries including multiple fractures and a head injury. Settlement exceeded $1,200,000.</p>



	<p class="red">Attorneys Counter Defense Argument of Illegal Passing, Obtain $560,000+ Settlement for Injured Motorcyclist</p>



	<p>A pickup truck and motorcycle collision has resulted in a total liability and underinsured recovery of $562,600.</p>



	<p>The pickup truck was stopped at the intersection and signaling a left turn when the driver of the truck observed an acquaintance in a parking lot to his right and began to turn right towards the lot, instead of left. In doing so, the pickup struck the cyclist who was passing on the paved shoulder on that side of the vehicle. The motorcyclist suffered a head injury.</p>



	<p>According to the motorcyclist's attorneys at Liever, Hyman &amp; Potter, "the defense argued that our client illegally passed on the right and was responsible for the accident. We were able to show that the applicable statute permits passing a turning vehicle on the right so long as you remain on the paved road surface or shoulder. Our client at all times was on the paved shoulder and was therefore not himself negligent."</p>



	<p class="red">Cross-Over Accident Results in $900,000 Settlement</p>



	<p>A 49-year-old unemployed laborer suffered multiple injuries when a beer truck crossed the center line and struck his vehicle. The insurer for the beer distributor paid $900,000 to compensate our client for his injuries.</p>



	<p><a class="subpagetop" href="javascript:void(0)">RETURN TO TOP</a></p>

</div>



<div id="mvi3" class="subpage">

	<a class="closesubpage" href="javascript:void(0)"><img class="grx" src="http://www.bbdesign.com/lhp/img/gr_x.jpg" alt="" border="0" /></a>



	<ul class="light plain">

		<li><a class="hl closesubpage" href="javascript:void(0)">MOTORCYCLE ACCIDENTS</a></li>

		<li>

			<h3>WE KNOW THE LAW.<br />

				RIDE WITH US.</h3>



			<img class="topimg" src="http://www.bbdesign.com/lhp/img/ph_mvi4.jpg" alt="" border="0" />

		</li>

	</ul>



	<ul class="dark clearfix popup">

		<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li><li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

	</ul>



	<ul class="light">

		<li><a class="jumptoaas" href="javascript:void(0)">AWARDS &amp; SETTLEMENTS</a></li>

	</ul>



	<h1>MOTORCYCLE ACCIDENTS</h1>



	<p>Most motorcycle accidents in Pennsylvania are the result of other motorists failing to see the motorcycle in traffic. And the result is almost always severe injuries, long-term disability or death. The cost of medical treatment, the pain and suffering, the medical complications, the loss of income &mdash; the effects can be devastating. That's why there are laws in place to help victims and their families put the pieces of their lives and future back together as much as possible.</p>



	<p>In Pennsylvania, certain rights of motorcycle accident victims are time-sensitive, and can be lost if not acted upon quickly. If your injuries were the result of another driver's negligence, our job will be to prove it and to get you the maximum award or settlement. To build your case we might add professional investigators, photographers, engineers (e.g. highway, forensic, product design) and other experts to our legal team.</p>



	<p>We are a Reading, Berks County, PA law firm which has won numerous awards and settlements for victims of vehicle accidents, including many multi-million dollar ones. You'll pay us no money &mdash; not a cent &mdash; until we recover money for you, after which our contingent fee will be based on a percentage of the award or settlement that will be clearly defined in the initial agreement to represent you. Unlike most other law firms, our agreement says that you will <span class="smallcaps">not</span> have to repay any of the expenses that we may have advanced on your behalf unless we recover money for you.</p>



	<p>In Philadelphia and all other areas of PA, call us toll free at 800.471.4691.</p>



	<h1 class="aas">AWARDS &amp; SETTLEMENTS</h1>



	<p class="red">Motorcycle Accident Settled for $1/2-million</p>



	<p>A settlement of $500,000 has been announced on behalf of a motorcyclist who suffered neck, shoulder, arm and hand injuries in a collision with an automobile. The motorcyclist, who was in his late 50s at the time of the accident, was traveling straight when a motor vehicle attempted to turn left directly in front of him.</p>



	<p>The victim was represented by Liever, Hyman &amp; Potter, one of the leading personal injury law firms in Berks and Schuylkill counties.</p>



	<p><a class="subpagetop" href="javascript:void(0)">RETURN TO TOP</a></p>

</div>



<div id="mvi4" class="subpage">

	<a class="closesubpage" href="javascript:void(0)"><img class="grx" src="http://www.bbdesign.com/lhp/img/gr_x.jpg" alt="" border="0" /></a>



	<ul class="light plain">

		<li><a class="hl closesubpage" href="javascript:void(0)">ACCIDENT FAQs</a></li>

		<li>

			<h3>AUTO, MOTORCYCLE<br />

				&amp; TRUCK ACCIDENTS<br />

				CAN RUIN LIVES. WE'LL<br />

				HELP YOU RECOVER.</h3>



			<img class="topimg" src="http://www.bbdesign.com/lhp/img/ph_mvi1.jpg" alt="" border="0" />

		</li>

	</ul>



	<ul class="dark clearfix popup">

		<li><a href="tel:6103706682"><img src="http://www.bbdesign.com/lhp/img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li><li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="http://www.bbdesign.com/lhp/img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>

	</ul>



	<h1>ACCIDENT FAQs</h1>



	<p><span class="red"><b>1. Do I have a case?</b></span><br />

		There's an easy way to find out: call us at 610-370-6682 or 570-799-5017. Simply tell us what happened. We'll tell you if we feel you have a good case, and answer any other questions you might have about the legal process. No pressure, no obligation, no cost. In fact, with Liever, Hyman &amp; Potter, you will pay no fee, not even expenses, unless we recover money for you.</p>



	<p><span class="red"><b>2. How will I be charged?</b></span><br />

		There are two ways that attorneys charge. One is by the hour. The other, which we use, is by a percentage of the money recovered for our clients. This is known as a "contingent fee." If for any reason we do not obtain a financial recovery for our client, there would be no charge for our services.</p>



	<p><span class="red"><b>3. What about expenses?</b></span><br />

		In some vehicle accident cases, there are expenses for medical experts, investigators and the like. Some attorneys will charge the client for these expenses regardless of the outcome of the case. We do not. We advance these expenses on behalf of our client. Assuming we win, part of the settlement is used to reimburse these costs. But if there is no recovery, our client wouldn't have to pay us back.</p>



	<p><span class="red"><b>4. How much is my case worth?</b></span><br />

		No two cases are alike. The value depends on many factors such as the nature, extent and permanency of the injuries, their effect on the victim's ability to earn a living, and their effect on the victim's/family's ability to enjoy life.</p>



	<p><span class="red"><b>5. Will I have to go to court?</b></span><br />

		Possibly, but most cases are settled out of court. When we have all of the information we need, we'll sit down with you, review the case, and determine the appropriate settlement figure. On your behalf, we'll then present the demand. As soon as we get a response, we'll call you. The decision to accept or reject the counteroffer is entirely up to you. If we reject it, we'll file a lawsuit. The case can still be settled out of court up to the time of the trial, but if it isn't, your trial lawyer is ready to represent you in court.</p>



	<p><span class="red"><b>6. Who decides whether my case is settled or goes to court?</b></span><br />

		You decide. We'll give you our recommendations, but the final decision is entirely yours.</p>



	<p><span class="red"><b>7. Who will decide my case?</b></span><br />

		If your case cannot be settled out of court, it will normally be decided by a jury. Some cases are decided by a judge. Others are decided by a panel of arbitrators, usually composed of three lawyers.</p>



	<p><span class="red"><b>8. What about my medical bills and lost wages?</b></span><br />

		Pennsylvania law requires that your initial medical bills be submitted to your own automobile insurance company, even if the accident was completely the fault of someone else. If your policy's medical coverage is used up, your bills should then be submitted to any other health care provider (e.g. Blue Cross, Medicare). Work loss benefits might also be available if such benefits are included in your auto insurance coverage. Being familiar with the benefits required by law, we know how to review your insurance policies and fully explain their benefits to you.</p>



	<p><span class="red"><b>9. What if the other driver has no insurance?</b></span><br />

		You or other family members living in your household may have "uninsured motorist" benefits on your policies. If someone outside of your family was driving, such benefits might also be available through the policy on the car you occupied at the time of the accident.</p>



	<p>If the other driver has insurance but not enough to fully compensate you, there may be "underinsured" motorist benefits available in the various policies. We'll check them and tell you exactly what protection you have.</p>



	<p><span class="red"><b>10. Can I recover for my pain and suffering?</b></span><br />

		By Pennsylvania law, when you purchased your insurance you should have been given a choice between "full tort" and "limited tort" coverage. If you selected the "full tort" option, you may recover for your pain and suffering. If you selected "limited tort," you may still collect for your pain and suffering if you have what the law defines as a "serious injury." But this is a general rule, and there are exceptions. We'll review the facts of your case and carefully analyze your insurance policy to determine your eligibility to claim damages for pain and suffering and any other losses that occurred.</p>



	<p><span class="red"><b>11. What about my car?</b></span><br />

		If you have automobile collision insurance, your own insurance company will reimburse you for the damage caused to your car, less any deductible. If the other driver's insurance company reimburses them for the full damage, your provider will also reimburse you for the deductible.</p>



		<p>If you don't have collision insurance, then you must look to the other driver's insurance to pay for the damage to your vehicle. We help our clients understand the property damage insurance coverage, and assist them in getting paid. This service is usually provided at no charge to the client.</p>



	<p><span class="red"><b>12. What if the accident was partially my fault?</b></span><br />

		You'll still be entitled to recover the medical or wage loss benefits provided under your own insurance policy. In addition, the law still allows a claim on your behalf against the other driver as long as you are not more at fault. In other words, if you are 50% or less at fault for the accident, you are still entitled to a proportionate financial recovery of the damages.</p>



	<p><a class="subpagetop" href="javascript:void(0)">RETURN TO TOP</a></p>

</div>



<div id="popupnotewrapper">

	<div id="popupnotecontent">

		<div id="popuptext1">Accident victims'<br />

			rights are extremely<br />

			time-sensitive.</div>

		<a id="popuptext2" href="tel:6103706682">CALL US NOW FOR FREE<br />

			TO SPEAK WITH AN ATTORNEY.</a>

		<div id="popupnoteclose"></div>

		<img id="popupx" src="img/gr_popup.jpg" alt="Accident victims' rights are extremely time-sensitive. Call us now for free to speak with an attorney." border="0" />

	</div>

</div>



<script src="http://www.bbdesign.com/lhp/js/vendor/jquery-1.7.2.min.js"></script>

<script src="http://www.bbdesign.com/lhp/js/plugins.js"></script>

<script src="http://www.bbdesign.com/lhp/js/main.js"></script>

<script>
$(window).on('scroll', function(){
	if ($(window).scrollTop() >= $('.topimg').height()) {
		$('#topmenu').css({
			position: 'fixed',
			top: 0,
			left: 0
		});
	} else {
		$('#topmenu').css({
			position: 'relative'
		});
	}
});
</script>

</body>

</html>

Open in new window

0
GaryCommented:
Is the top section not already at the top of the screen? Confused about your layout
Normally you would just use position:fixed for the header section, wrap the rest of the page in a container div and give it a top margin equal to the header height.
Else tommyBoy's solution will be the way to go.
0
skullnobrainsCommented:
the simplest would probably be to duplicate those buttons and logo :

- put an absolutely positioned hidden copy of the content on top of the page
- attach to the onload, onscroll and onresize events of the page
- when the initial logo's offsetTop is negative, make the copy visible
- when it is positive, hide it

ou can achieve this better using layers (but painful to work out cross browser) :
- set the fixed logo and buttons on the page
- set the image in a container on top of the previous
- set everything else behind both of these
when the page is scrolled, the sliding logo will disapear and the fixed one remain

both solutions are slightly different in behaviour. the first will not allow for transient situations in which a part of both copies are visible at once but will likely slide less smoothly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Brad BansnerWeb DeveloperAuthor Commented:
skullnobrains, that occurred to me, but if I can find a way to not have to duplicate elements, I think that would be better.

tommyBoy, trying that out, thanks.
0
skullnobrainsCommented:
2 buttons and a logo does not involve much duplication since you'll reuse the images for both. and it will make it run smoother with a simpler js. i'd go for duplication and show/hide in js because it's simple to setup and understand and it will be cross-bowser without extra hassle. but the choice is obviously yours to make

if you want a single instance, beware that changing styles for the banner by for example making it fixed will remove it from the page's main flow which will mess with the scrolling at least on some browsers if you don't have a placeholder

you can achieve what you want by setting the banner with position:relative and set it's top property to the absolute value of it's offsetTop when it is negative and 0 otherwise. attach to onscroll, onresize, and onload
0
Tom BeckCommented:
The duplication can be done with jquery clone() so there's no need to actually duplicate the elements in the markup. Also, toggling the display for the duplicate from none to block is unnecessary. Simply toggle the existence of the clone.

Replace the script at the bottom of my mock up with this to experiment:
<script>
$(window).on('scroll', function(){
	if ($(window).scrollTop() >= $('.topimg').height()) {
		var newTopMenu = $('#topmenu').clone();
		$(newTopMenu).attr({
			'id': 'newTopMenu',
			'style': 'position:fixed;top:0;left:0;width:100%;background-color:brown;z-index:100'
		});
		if ($('#newTopMenu').length == 0) {
			$('body').prepend(newTopMenu);
		}
	} else {
		$('body').find('#newTopMenu').remove();
	}
});
</script>

Open in new window

0
skullnobrainsCommented:
this one works as expected without duplicates clones. you can copy-paste it for testing

the only interesting parts are position:relative added to the styles of the banner (i also gave the banner an id for convenience) and the few lines of js code at the end

<h3>AUTO, MOTORCYCLE<br />
	&amp; TRUCK ACCIDENTS<br />
	CAN RUIN LIVES. WE'LL<br />
	HELP YOU RECOVER.</h3>

<img class="topimg" src="img/ph_mvi1.jpg" id="banner" alt="IMAGE" border="0" />

<a href="http://www.bbdesign.com/lhp"><img class="logo" src="img/lg_lhp.jpg" alt="Liever Hyman Potter" border="0" /></a>

<div class="topnav" id="topnav">
	<a href="http://www.bbdesign.com/lhp"><img class="logo" src="img/lg_lhp.jpg" alt="Liever Hyman Potter" border="0" /></a>

	<ul class="dark floatleft">
		<li><a href="tel:6103706682"><img src="img/mb_telephone.png" alt="Call for Free" border="0" />Call for Free</a></li>
		<li><a href="mailto:lawyer@lieverhymanpotter.com"><img src="img/mb_email.png" alt="E-Mail" border="0" />E-Mail</a></li>
	</ul>
</div>

some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />
some content
<br /><br />

<style>
img{
	height:60px;
	display:block;
}
#topnav{
	background-color:green;
	position:relative;
}

</style>

<script>
var banneroffset=document.getElementById('topnav').offsetTop;
function placebanner(){
	scrollpos=window.scrollY-banneroffset;
	if(scrollpos > 0)document.getElementById('topnav').style.top=scrollpos+'px';
	else document.getElementById('topnav').style.top=0;
}
window.onscroll=placebanner;
</script>

Open in new window


scrollY has to be determined cross-browser. it probably does not work in IE like this but you'll find cross-browser ways to determine the scrolling of a page all over the internet.
0
Brad BansnerWeb DeveloperAuthor Commented:
if you want a single instance, beware that changing styles for the banner by for example making it fixed will remove it from the page's main flow which will mess with the scrolling at least on some browsers if you don't have a placeholder

Yes, I found this out, so I am trying some of the other suggestions.
0
Brad BansnerWeb DeveloperAuthor Commented:
I ended up keeping this really simple and just duplicating the header bits. The CSS and Javascript are much less complicated that way.

Thanks for all the suggestions and help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.