diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-19 10:34:12 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-19 10:34:12 +0100 |
commit | df1704ef911847d4e390d1cde0cc80c35a19cbbe (patch) | |
tree | e13c73eb570ff0ce78b59b4875a1f189d1fd1390 /js/codeq/language.js | |
parent | a184ad0a8a36c94669b6e07c311f4177a38edb63 (diff) |
Use preventDefault instead of return false for link events
Diffstat (limited to 'js/codeq/language.js')
-rw-r--r-- | js/codeq/language.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/codeq/language.js b/js/codeq/language.js index e86b09e..97691e6 100644 --- a/js/codeq/language.js +++ b/js/codeq/language.js @@ -9,15 +9,14 @@ jqRobot = $('#choose-robot'),
choose = function (language) {
codeq.globalStateMachine.transition('problem_list', language);
- return false;
};
codeq.globalStateMachine.register('language',{
'enter': function(){
jqScreen.css('display', '');
- jqProlog.on('click', function () { return choose('prolog') });
- jqPython.on('click', function () { return choose('python') });
- jqRobot.on('click', function () { return choose('robot') });
+ jqProlog.on('click', function (e) { e.preventDefault(); choose('prolog') });
+ jqPython.on('click', function (e) { e.preventDefault(); choose('python') });
+ jqRobot.on('click', function (e) { e.preventDefault(); choose('robot') });
},
'exit' : function(){
jqProlog.off();
|