Hl.WebMain/Source/jsplug/jq.sticky/sticky.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Sticky v1.0 by Daniel Raftery
// http://thrivingkings.com/sticky
//
// http://twitter.com/ThrivingKings
(function ($) {
// Using it without an object
$.sticky = function (note, options, callback) { return $.fn.sticky(note, options, callback); };
$.fn.sticky = function (note, options, callback) {
// Default settings
var position = 'top-center'; // top-left, top-right, bottom-left, or bottom-right
var settings = { 'speed': 500, 'duplicates': false, 'autoclose': 3000 };
// Passing in the object instead of specifying a note
if (!note) { note = this.html(); }
if (options) { $.extend(settings, options); }
// Variables
var display = true;
var duplicate = 'no';
// Somewhat of a unique ID
var uniqID = Math.floor(Math.random() * 99999);
// Handling duplicate notes and IDs
$('.sticky-note').each(function () {
if ($(this).html() == note && $(this).is(':visible')) {
duplicate = 'yes';
if (!settings['duplicates']) {
display = false;
}
}
if ($(this).attr('id') == uniqID)
{ uniqID = Math.floor(Math.random() * 9999999); }
});
// Make sure the sticky queue exists
if (!$('body').find('.sticky-queue').html()) {
$('body').append('<div class="sticky-queue ' + position + '"></div>');
}
// Can it be displayed?
if (display) {
// Building and inserting sticky note
$('.sticky-queue').prepend('<div class="sticky border-' + position + '" id="' + uniqID + '"></div>');
$('#' + uniqID).append('<img src="/Source/jsplug/jq.sticky/close.png" class="sticky-close" rel="' + uniqID + '" title="Close" />');
$('#' + uniqID).append('<div class="sticky-note" rel="' + uniqID + '">' + note + '</div>');
// Smoother animation
var height = $('#' + uniqID).height();
$('#' + uniqID).css('height', height);
$('#' + uniqID).slideDown(settings['speed']);
display = true;
}
// Listeners
$('.sticky').ready(function () {
后面还有 11 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
