This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.addEventListener("DOMContentLoaded", function (event) { | |
setTimeout(function () { | |
var resource = document.createElement('script'); | |
resource.async = "true"; | |
resource.src = ""; | |
var script = document.getElementsByTagName('script')[0]; | |
script.parentNode.insertBefore(resource, script); | |
}, 3000); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
list($class) = explode('?', $_SERVER['REQUEST_URI']); | |
$class = str_replace(array('/', '.php'), '', $class); | |
?> | |
<?php echo $class ?> | |
//////////////////// | |
$url = explode('/', $_SERVER['REQUEST_URI']); | |
$dir = $url[1] ? $url[1] : 'home'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.hasScrollBar = function() { | |
return this.get(0).scrollWidth > this.width(); | |
} | |
function elWrapScroll() { | |
var $elWrap = $('.el-wrap'); | |
$elWrap.each(function () { | |
if ($(this).hasScrollBar()) { | |
$(this).addClass('is-scroll'); | |
} else { | |
$(this).removeClass('is-scroll'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// insertedInit | |
$(insertedInit); | |
function uOrderInitInit(){ | |
var $parent = $('.parent'); | |
var $el = '.el'; | |
$parent.on("DOMNodeInserted", function (event) { | |
$(event.target).find($el).addClass(); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.hasScrollBar = function() { | |
return this.get(0).scrollWidth > this.width(); | |
} | |
function wrapScroll() { | |
$('.wrap').each(function () { | |
if ($(this).hasScrollBar()) { | |
$(this).addClass('is-scroll'); | |
} else { | |
$(this).removeClass('is-scroll'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
max-width: 40em; | |
max-height: 20em; | |
overflow: scroll; | |
position: relative; | |
} | |
table { | |
position: relative; | |
border-collapse: collapse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// !!!dotdotdot-js-2.0.1 | |
/* | |
<div class="truncable-txt"> | |
text, text, text | |
<span class="truncable-txt__more">more</span> | |
<span class="truncable-txt__less">less</span> | |
</div> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<div class="truncable-txt"> | |
text, text, text | |
<span class="truncable-txt__more">more</span> | |
<span class="truncable-txt__less">less</span> | |
</div> | |
<style> | |
.truncable-txt--is-truncated .truncable-txt__more, | |
.truncable-txt--is-not-truncated .truncable-txt__less { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uOrderInitInit | |
$(uOrderInitInit); | |
function uOrderInitInit(){ | |
var $filterOutput = $('.filter-output'); | |
var $uOrder = $('.table-u-order__hint'); | |
var $uOrderEl = '.table-u-order__hint'; | |
var $uOrderParent = 'td'; | |
var $uOrderParentClass = 'table-u-order'; | |
if ($uOrder.length) { | |
$uOrder.parent($uOrderParent).addClass($uOrderParentClass); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resetForms = function() { | |
for (i = 0; i < $jsForm.length; i++) { | |
$jsForm[i].reset(); | |
} | |
} | |
resetForms(); |