pseudo code for active state on nav


/ Published in: Pseudocode
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ITEMS
  2. 1,2,3
  3.  
  4. STATES
  5. activeButton
  6. clickedButton
  7.  
  8. ITERATOR
  9. iterateThroughNav
  10.  
  11. ACTION
  12. if(active && clicked || !active && !clicked) = do nothing
  13. if(!active && clicked) = setActive
  14. if(active && !clicked) = unsetActive

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.