mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
48 lines
836 B
JavaScript
48 lines
836 B
JavaScript
var ST = window.ST || {}
|
|
|
|
ST.init = function() {
|
|
ST.change();
|
|
ST.show();
|
|
ST.expand();
|
|
};
|
|
|
|
ST.change = function() {
|
|
$('.change').oneTime(3000,
|
|
function() {
|
|
$(this).fadeOut(2000);
|
|
});
|
|
};
|
|
|
|
ST.show = function() {
|
|
$('.show').click(function() {
|
|
$('.advanced').hide();
|
|
$('.advanced_options').show();
|
|
return false;
|
|
});
|
|
};
|
|
|
|
ST.expand = function() {
|
|
$('.expand').click(function() {
|
|
if ($('.paste').hasClass('full')) {
|
|
return false;
|
|
}
|
|
var window_width = $(window).width();
|
|
var spacer = 20;
|
|
if (window_width < 900) {
|
|
window_width = 900;
|
|
spacer = 0;
|
|
}
|
|
var new_width = (window_width - (spacer * 3));
|
|
$('.text_formatted').animate({
|
|
'width': new_width + 'px',
|
|
'left': '-' + (((window_width - 900) / 2 - spacer)) + 'px'
|
|
},
|
|
200);
|
|
return false;
|
|
});
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
ST.init();
|
|
});
|