This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Dynamic Navigation
#1
Im trying to make a clickable link change its destination based on an alarm.

I've tried multiple things like changing the link and refreshing the site.
I've dug down into the code, but i cant replicate the way it behaves.

I see its loading in all the visualization pages and hiding and unhiding them, but when i try to replicate this the image gets distorted.

Any suggestions from those with deeper understanding of the code?
Reply
#2
Add this to custom JavaScript. Link element additional class must be set to alarm-link. When 1/1/1 is true plan ID 1 is shown, 2 otherwise.
Code:
$(function() {
  $('.alarm-link').off('vclick').on('vclick', function() {
    var alarm = grp.getvalue('1/1/1'), id;
    
    if (alarm) {
      id = 1;
    }
    else {
      id = 2;
    }
    
    showPlan(id);
  });
});
Reply
#3
This is perfect, thank you very much
Reply


Forum Jump: