instead of including the entire jquery ui lib for a single function, just load the single function
This commit is contained in:
parent
ba6ab8fb16
commit
428d1285e0
6
lib/jquery-ui-1.10.4.custom.min.js
vendored
6
lib/jquery-ui-1.10.4.custom.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,32 @@
|
|||||||
/*jshint bitwise:false, curly:true, eqeqeq:true, evil:true, forin:false, noarg:true, noempty:true, nonew:true, undef:false, strict:false, browser:true */
|
/*jshint bitwise:false, curly:true, eqeqeq:true, evil:true, forin:false, noarg:true, noempty:true, nonew:true, undef:false, strict:false, browser:true */
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
/** Load jQuery extensions **/
|
||||||
|
//Code via: http://stackoverflow.com/a/13106698
|
||||||
|
$.fn.highlight = function (fadeOut) {
|
||||||
|
fadeOut = typeof fadeOut !== 'undefined' ? fadeOut : 5000;
|
||||||
|
$(this).each(function () {
|
||||||
|
var el = $(this);
|
||||||
|
$("<div/>")
|
||||||
|
.width(el.outerWidth())
|
||||||
|
.height(el.outerHeight())
|
||||||
|
.css({
|
||||||
|
"position": "absolute",
|
||||||
|
"left": el.offset().left,
|
||||||
|
"top": el.offset().top,
|
||||||
|
"background-color": "#ffff99",
|
||||||
|
"opacity": ".7",
|
||||||
|
"z-index": "9999999",
|
||||||
|
"border-top-left-radius": parseInt(el.css("borderTopLeftRadius"), 10),
|
||||||
|
"border-top-right-radius": parseInt(el.css("borderTopRightRadius"), 10),
|
||||||
|
"border-bottom-left-radius": parseInt(el.css("borderBottomLeftRadius"), 10),
|
||||||
|
"border-bottom-right-radius": parseInt(el.css("borderBottomRightRadius"), 10)
|
||||||
|
}).appendTo('body').fadeOut(fadeOut).queue(function () { $(this).remove(); });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/** Setup jQuery.timeago **/
|
/** Setup jQuery.timeago **/
|
||||||
jQuery.timeago.settings.cutoff = 365 * 24 * 60 * 60 * 1000; // Display original dates older than 1 year
|
$.timeago.settings.cutoff = 365 * 24 * 60 * 60 * 1000; // Display original dates older than 1 year
|
||||||
$("time").timeago();
|
$("time").timeago();
|
||||||
|
|
||||||
/** Setup tablesorter **/
|
/** Setup tablesorter **/
|
||||||
@ -17,7 +41,7 @@ $(document).ready(function() {
|
|||||||
// highlight it when clicked
|
// highlight it when clicked
|
||||||
$(elm).click(function(e) {
|
$(elm).click(function(e) {
|
||||||
// This needs jQuery UI
|
// This needs jQuery UI
|
||||||
$(target_id).effect('highlight', {}, 5000);
|
$(target_id).highlight();
|
||||||
});
|
});
|
||||||
// vanilla target name should already be in the URL tag, but this
|
// vanilla target name should already be in the URL tag, but this
|
||||||
// will include the anon ID as displayed on screen
|
// will include the anon ID as displayed on screen
|
||||||
@ -124,5 +148,5 @@ function replyTo(imageId, commentId, userId) {
|
|||||||
|
|
||||||
box.focus();
|
box.focus();
|
||||||
box.val(box.val() + text);
|
box.val(box.val() + text);
|
||||||
$("#c"+commentId).effect("highlight", {}, 5000);
|
$("#c"+commentId).highlight();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user