Skip to content

Commit

Permalink
Removed some lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjsaylor committed Aug 31, 2013
1 parent b6df0aa commit 18c3b83
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions jquery.scrolltab.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

var data = {
body: 0
}
};

return this.each(function(index) {
var obj = $(this);
Expand Down Expand Up @@ -98,15 +98,14 @@
$('html,body').animate({scrollTop: obj.offset().top+"px"}, 1000);
return false;
})
.css('cursor', 'pointer')
.css('cursor', 'pointer');

$.fn.scrolltab.pinInitialDisplay(pin);

// Update pin status (if applicable) every second.
setInterval(function() {
update(obj, pin);
}, 1000);

}

/**
Expand All @@ -132,7 +131,7 @@
pin.attr('class', options.classname);
}
if(options.title) {
pin.html(options.title)
pin.html(options.title);
}
}

Expand All @@ -148,17 +147,17 @@
* @return void
*/
function update(object, pin) {
if(object.parents().length == 0) {
if(object.parents().length === 0) {
setTimeout(function() { pin.remove(); }, 1000);
} else if(object.css('display') == 'none') {
} else if(object.css('display') === 'none') {
pin.fadeOut();
} else {
setTimeout(function() { pin.animate({top: calc(object, pin)}); }, 1000);
}

if(!isPinable()) {
pin.fadeOut('fast');
} else if(isPinable() && object.css('display') != 'none') {
} else if(isPinable() && object.css('display') !== 'none') {
pin.fadeIn();
}
}
Expand All @@ -172,8 +171,9 @@
*/
function calc(object, pin) {
return parseInt(
object.offset().top / $('body').height() * $(window).height() + (pin.height() / 2)
, 10);
object.offset().top / $('body').height() * $(window).height() + (pin.height() / 2),
10
);
}

/**
Expand All @@ -185,7 +185,7 @@
return $('body').height() > $(window).height();
}

}
};

/**
* Exposed default options.
Expand All @@ -198,7 +198,7 @@
mouseenter: function(){},
mouseleave: function(){},
click: function(){}
}
};

/**
* Initial pin display method.
Expand All @@ -209,6 +209,6 @@
*/
$.fn.scrolltab.pinInitialDisplay = function (pin) {
pin.fadeIn('slow');
}
};

})(jQuery);

0 comments on commit 18c3b83

Please sign in to comment.