Skip to content

Instantly share code, notes, and snippets.

ColtMoney

Block or report user

Report or block ColtMoney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View modulejavascript.js
var contactMe = (function() {
var init = function() {
_setUpListners();
};
var _setUpListners = function() {
};
View jQueryScroll.js
$('.go_to').click( function(){ // ловим клик по ссылке с классом go_to
var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href, должен быть селектором, т.е. например начинаться с # или .
if ($(scroll_el).length != 0) { // проверим существование элемента чтобы избежать ошибки
$('html, body').animate({ scrollTop: $(scroll_el).offset().top }, 500); // анимируем скроолинг к элементу scroll_el
}
return false; // выключаем стандартное действие
});
View ScrollTop.js
$(".scroll-top-box").hide();
$(window).scroll(function (){
if ($(this).scrollTop() > 500){
$(".scroll-top-box").fadeIn();
} else{
$(".scroll-top-box").fadeOut();
}
});
View CurrentMonth.js
Date.prototype.getMonthName = function() {
var month = ['Jan','Feb','Mar','Apr','May','Jun',
'Jul','Aug','Sep','Oct','Nov','Dec'];
return month[this.getMonth()];
}
var today = new Date();
var year = today.getFullYear();
var month = today.getMonthName();
var day = today.getDate();
View Pjax.js
$(document).pjax(".item-link, .head-logo a", ".pjax-container", {fragment: ".pjax-container"});
$(".pjax-container").on("pjax:success", function(){
$.pjax({
url: window.location.href,
container: ".main-menu",
fragment: ".main-menu"
});
});
View multipurpose-php-mail.php
<?php
$to = 'example@gmail.com';
$errors = array();
$method = $_SERVER['REQUEST_METHOD'];
$c = true;
if ( $method === 'POST' ) {
$project_name = trim($_POST["project_name"]);
View target-dropmenu.js
$(document).on("mouseup", function(e){
var target = e.target;
var dotBtn = $(".dot_down-btn");
var toolsDropMenu = $(".drop_content_inner_list");
if (!dotBtn.is(target) && dotBtn.has(target).length === 0 && !toolsDropMenu.is(target) && toolsDropMenu.has(target).length === 0) {
toolsDropMenu.removeClass("active");
}
View tab.html
<ul class="tabs-item">
<li class="active"></li>
<li></li>
<li></li>
<li></li>
</ul>
<div class="tabs-content-wrap">
<div class="tab-content-item">
</div>
View Accordion.html
<div class="accordion-item">
<div class="accordion-title">
</div>
<div class="accordion-content">
</div>
</div>
View mobile-menu-media.css
.top-header .container{
position: static;
}
.main-menu{
position: absolute;
top: 100%;
left: -120vw;
right: 0;
width: 100%;
background-color: #266DCD;
You can’t perform that action at this time.