fixed aspect selector bug in header

This commit is contained in:
danielgrippi 2011-03-23 11:58:10 -07:00
parent 9abe22d5d2
commit e4e8d7ada4

View file

@ -19,26 +19,29 @@ $(document).ready(function(){
$("a.hard_aspect_link").live("click", function(e){ $("a.hard_aspect_link").live("click", function(e){
e.preventDefault(); var link = $(this);
requests++; if( !link.hasClass('aspect_selector') ){
e.preventDefault();
requests++;
var guid = $(this).attr('data-guid'); var guid = $(this).attr('data-guid');
// select correct aspect in filter list & deselect others // select correct aspect in filter list & deselect others
$("#aspect_nav li").each(function(){ $("#aspect_nav li").each(function(){
var $this = $(this); var $this = $(this);
if( $this.attr('data-guid') == guid){ if( $this.attr('data-guid') == guid){
$this.addClass('selected'); $this.addClass('selected');
} else { } else {
$this.removeClass('selected'); $this.removeClass('selected');
} }
}); });
// loading animation // loading animation
$("#aspect_stream_container").fadeTo(100, 0.4); $("#aspect_stream_container").fadeTo(100, 0.4);
$("#aspect_contact_pictures").fadeTo(100, 0.4); $("#aspect_contact_pictures").fadeTo(100, 0.4);
performAjax( $(this).attr('href')); performAjax( $(this).attr('href'));
}
}); });
$("#aspect_nav a.aspect_selector").click(function(e){ $("#aspect_nav a.aspect_selector").click(function(e){