Announcement

Collapse
No announcement yet.

Header events not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Header events not working

    I add new propery site/header.js and events for example;
    Code:
    'click a.action': function (e) {
        console.log("test");
    },
    
    actionTest: function () {
        this.getRouter().dispatch(null, 'test');
        this.getRouter().navigate('', {trigger: false});
    },
    Html;
    Code:
    <li><a href="action" data-action="test">Test</a></li>

  • #2

    Hi, click a.action
    <a href="action" .. you don't have class action

    Comment


    • #3
      Originally posted by tanya View Post
      Hi, click a.action
      <a href="action" .. you don't have class action
      You're right. I arranged it this way. But it still doesn't work.
      Nothing triggers and no error messages. Please help

      Code:
      <li>
        <a href="javascript:;" class="action" data-action="test">Test</a>
      </li>
      Code:
      'click a.action': function (e) {
          console.log("Test");
      }
      Code:
      actionTest: function () {
          this.getRouter().dispatch(null, 'logout');
          this.getRouter().navigate('', {trigger: false});
      }

      Comment

      Working...
      X