Skip to content Skip to sidebar Skip to footer

Scroll A Div When Scroll The Page

This function jquery, scroll a div (with the css named 'Search') when the user scroll the page.. $(window).scroll(function(){ $.each($('.Search'),function(){ var wind

Solution 1:

You can use only css...

.search {
  width: 200px;
  height: 50px;
  background-color: red;
  position: fixed;
  top: 90px;
}

See the Example

Greetings.


Solution 2:

Works fine in IE. The CSS I used for search is

.search {
  position: absolute;
  top: 90px;
}

Working Demo

Edit

For a faster animation transition, clear the queue.

.stop(true)

Post a Comment for "Scroll A Div When Scroll The Page"