0
<ul id="nav">
<li><a href="#top">Hello</a></li>
<li><a href="#work">Work</a></li>
<li><a href="#process" data-0="color:white;" data-top-top="color:blue;" data-anchor-target="#portfolio">Process</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contactme">Contact</a></li>
</ul>

This code currently changes the text color on my navigation when I reach the div #portfolio. Is there any way I can add another trigger with a different data-anchor-target? To the same button I might add.

1
  • No, but want is it that you want to achieve? You could for example use the wrapping <li> and add more keyframes to it.
    – Prinzhorn
    Feb 13, 2014 at 15:33

1 Answer 1

0

If you are trying to change the value of attribute on basis of some JavaScript functionality, define that function in 'render' in init();

render: function(data){
  var flag = true; // Here goes your logic to choose if you want to change the attribute
  if(flag) document.getElementById('blue').setAttribute('data-anchor-target', '#blue');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.