Commit ab03b77ea3d3f4e391c6fed8d6f477a27a60c2e1
1 parent
d90b2792
Exists in
master
and in
12 other branches
adding preventDefault for event
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
js/main.js
| ... | ... | @@ -16,8 +16,8 @@ var noosferoAPI = 'http://www.participa.br/api/v1/articles?private_token=9350c14 |
| 16 | 16 | $.getJSON(noosferoAPI) |
| 17 | 17 | .done(function( data ) { |
| 18 | 18 | resultsPlaceholder.innerHTML = template(data); |
| 19 | - $( 'a' ).click(function(){ | |
| 20 | - var item = this.href.split('#').pop(); | |
| 19 | + $( 'a' ).click(function(event){ | |
| 20 | + var item = this.href.split('#').pop(); | |
| 21 | 21 | if(item == 'proposal-categories'){ |
| 22 | 22 | $('#proposal-group').hide(); |
| 23 | 23 | $('#nav-proposal-categories a').addClass('active'); |
| ... | ... | @@ -32,6 +32,7 @@ $.getJSON(noosferoAPI) |
| 32 | 32 | } |
| 33 | 33 | $('.proposal-detail').hide(); |
| 34 | 34 | $('#' + item).show(); |
| 35 | + event.preventDefault(); | |
| 35 | 36 | }); |
| 36 | 37 | }) |
| 37 | 38 | .fail(function( jqxhr, textStatus, error ) { | ... | ... |