javascript - How to not apply skrollr js properties to a div inside another div? -


i have created 2 concentric circles, c1 , c2 respectively. trying user scroll down, circle shrinks , vanishes. using jquery plugin "skrollr js" , problem facing inside circle want content stay fixed on screen , circle vanishes should vanish too.

basically, trying re-create http://www.evanshalshaw.com/bondcars/index.html in basic manner.

<div id="skrollr-body"> <div class="slides">     <div id="c1" class="circle-mask centred" data-0="transform:scale(2); " data-1000="transform:scale(0);">      <div class="content">hello</div>     </div>     <div id="c2" class="circle-mask centred" data-1000="transform:scale(2);" data-2000="transform:scale(0);"></div> </div> </div> 

for full code, please see fiddle.

i have created far : https://jsfiddle.net/lplq5mla/

as shown in jsfiddle "hello" moving scroll down want remain fix , disappear when circle vanishes.

please refer fiddle if confusion. tried best write clean code, better way appreciated. thank you!

edit : tried content in div , putting above animated div doesn't work.

scale scaling whole element , contents. try scaling "hello" up. if that's not option, move hello out of div

https://jsfiddle.net/hjlxqvkt/

.content {     position: fixed;     top: 0;     left: 0;     border: 10px inset red;     z-index: 11;     width: 100%;     height: 100%;  } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -