javascript - Page/Div Content fade in and out on click -


i have been working on recruiting website days now. newbie in programming. please need script load employment review content fade out on click of of each employment vacancy div , fade in on clicking "close" on employment review content page. thanks.

employment vacancy page employment vacancy listing

you can use jquery achieve this: http://api.jquery.com/fadeout/

$( "#vacancy-div-id" ).click(function() {   $( "#id-of-what-you-want-to-fade-out" ).fadeout( "slow", function() {     // animation complete.   }); }); 

to fade in can use this: http://api.jquery.com/fadein/

$( "#close-button-id" ).click(function() {   $( "#id-of-what-you-want-to-fade-in" ).fadein( "slow", function() {     // animation complete   }); }); 

more detailed example - put in html:

<script>     $( "#close-button-id" ).click(function() {       $( "#id-of-what-you-want-to-fade-in" ).fadein( "slow", function() {         // animation complete       });     }); </script> 

if not know id of want click trigger fadein animation, can right click on element , click inspect, show html of page.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -