Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Handle new Toggle Pages
- $('#page-nav a').click(function(){
- if(!$(this).hasClass('active')){
- sectionID = $(this).attr('id');
- sectionID = sectionID.replace('-nav','-section');
- $('#page-nav a').each(function(){
- $(this).removeClass('active');
- });
- $(this).addClass('active');
- $('.toggle-page-section').each(function(){
- $(this).hide();
- });
- $('#'+sectionID).fadeIn(300);
- }
- });
- $(window).load(function(){
- var toggleUrl = window.location.href;
- var toggleUrlArray = toggleUrl.split('#');
- toggleID = '#' + toggleUrlArray[1] + '-nav';
- if(toggleUrlArray[1]){
- $(toggleID).click();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement