Bonjour à tous,

Voilà mon problème, j'ai plusieurs liens dans une sidebar, des liens normaux qui changent de pages, et je leur place un event 'click' qui ferme la sidebar lorsque l'on clique sur les liens:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
Template.rightbar.events({
  'click .link': function () {
    $.sidebars.close('right');
   }
});
Mais lorsque je clic sur les fameux liens, ca redirige bien sur la page voulu, mais ca m'ouvre aussi une popup avec l'url '/right', pour tester, j'ai remplacé $.sidebars.close('right'); par $.sidebars.close('foobar'); et ca ouvre une popup avec l'url '/foobar'.

Pour gérer la sidebar, j'utilise le plugin jQuery http://plugins.adchsm.me/slidebars/

J'ai donc regardé dans le code source du plugin (Source), dans la fonction close, deux events sont déclenchés:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    this.close = function(id, callback) {
        // Shift callback arguments
        if (typeof id === 'function') {
            callback = id;
            id = null;
        }
 
        // Check Slidebars has been initialized
        if (!initialized) {
            throw "Slidebars has not been initialized.";
        }
 
        // Check to see if the Slidebar exists
        if (id && !offCanvas.hasOwnProperty(id)) {
            throw "Error closing Slidebar, there is no Slidebar with id '" + id + "'.";
        }
 
        // If no id was passed, get the active Slidebar
        if (!id) {
            id = this.active('slidebar');
        }
 
        // Close a Slidebar
        if (id && offCanvas[id].active) {
            // Set active state to false
            offCanvas[id].active = false;
 
            // Trigger event
            $(events).trigger('closing', [offCanvas[id].id]);
 
            // Get animation properties
            var animationProperties = getAnimationProperties(id);
 
            // Apply css
            animationProperties.elements.css('transform', '');
 
            // Transition completetion
            setTimeout(function() {
                // Remove transition duration
                animationProperties.elements.css('transition-duration', '');
 
                // Hide the Slidebar
                offCanvas[id].element.css('display', 'none');
 
                // Trigger event
                $(events).trigger('closed', [offCanvas[id].id]);
 
                // Run callback
                if (typeof callback === 'function') {
                    callback();
                }
            }, animationProperties.duration);
        }
    };
Est ce que ces events ont un rapport avec mon problème ? Comment je pourrait résoudre ça ?

Merci d'avance !