Jquery .animate only from index page -


i designing small site in header have different height/position other pages (pages x & y). use .animate animate style change when user goes index pages x or y, not when user goes between pages x & y.

how can use jquery determine page user on, , initiate animation if user going index x or y?

css, header:

header { width: 100%; padding: 4% 0 10px; } 

index header:

.index header { position: absolute; top: 130px; }  

x & y header:

.work header, .bio header { padding-top: 2%; } 

determine page coming using referrer , if coming index followed checking presence of elements on x or y

$(document).ready(function() {    var referrer =  document.referrer;    if(/*do custom check on referrer see if coming index */)    {           // check if on x or y        if($(".work").length || $(".work").length){            // trigger animation         }    }  }); 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -