View Single Post
Old 02-15-2012, 02:54 AM   PM User | #9
mjy
New Coder

 
Join Date: Jan 2012
Location: United States
Posts: 28
Thanks: 0
Thanked 6 Times in 6 Posts
mjy is an unknown quantity at this point
Hello craigr7,

So you're saying that you want to activate page lengthening if location.hash is equal to any one of those three values? That would suggest an OR expression:
Code:
if (location.hash === "#anchor1" ||
    location.hash === "#anchor2" ||
    location.hash === "#anchor3")
   {
   // then activate page lengthening...
   }
__________________
Author of the Kindle book JavaScript: Just the Basics - A Primer for the Complete Beginner. Learn JavaScript for the price of a fancy coffee drink.
mjy is offline   Reply With Quote