Fixed some tabbing

Removed some more unneeded jQuery object constructors for the button fancyboxes
Replaced event.target with the this keyword
This commit is contained in:
OhaiBBQ 2010-11-01 14:23:16 -07:00
parent 175e5bdc30
commit 94e4c22fcf

View file

@ -5,7 +5,6 @@
$(document).ready(function(){ $(document).ready(function(){
$('#debug_info').click(function() { $('#debug_info').click(function() {
$('#debug_more').toggle('fast'); $('#debug_more').toggle('fast');
}); });
@ -26,12 +25,12 @@ $(document).ready(function(){
}); });
//buttons////// //buttons//////
$(".add_aspect_button").fancybox({ 'titleShow' : false , 'hideOnOverlayClick' : false }); $(".add_aspect_button," +
$(".add_request_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false }); ".add_request_button," +
$(".invite_user_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false }); ".invite_user_button," +
$(".add_photo_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false }); ".add_photo_button," +
$(".remove_person_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false }); ".remove_person_button," +
$(".question_mark").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false }); ".question_mark").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$("input[type='submit']").addClass("button"); $("input[type='submit']").addClass("button");
@ -65,10 +64,11 @@ $(document).ready(function(){
}); });
$('body').click( function(event){ $('body').click( function(event){
if(!$(event.target).closest('#user_menu').length){ var $this = $(this);
if(!$this.closest('#user_menu').length){
$("#user_menu").removeClass("active"); $("#user_menu").removeClass("active");
}; };
if(!$(event.target).closest('.reshare_pane').length){ if(!$this.closest('.reshare_pane').length){
$(".reshare_button").removeClass("active"); $(".reshare_button").removeClass("active");
$(".reshare_box").hide(); $(".reshare_box").hide();
}; };