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 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 Accordion.js
$(".accordion-title").click(function () {
var blockFaq = $(this).parents(".accordion-item");
if (!$(blockFaq).hasClass("accordion-active")) {
$(".accordion-item").removeClass("accordion-active");
$(".accordion-content").hide(300);
$(blockFaq).addClass("accordion-active");
$(blockFaq).find(".accordion-content").show(300);
}
else {
$(".accordion-item").removeClass("accordion-active");
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 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 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 ScrollTop.js
$(".scroll-top-box").hide();
$(window).scroll(function (){
if ($(this).scrollTop() > 500){
$(".scroll-top-box").fadeIn();
} else{
$(".scroll-top-box").fadeOut();
}
});
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 modulejavascript.js
var contactMe = (function() {
var init = function() {
_setUpListners();
};
var _setUpListners = function() {
};
View JQueryAcordion.js
$(".category-wrap span").click(function(){
if($(".sub-catalog").is(":visible") == true){
$(this).parent().find(".sub-catalog").slideUp();
$(this).find(".fa").addClass("fa-angle-right");
$(this).find(".fa").removeClass("fa-angle-down");
if($(this).parent().find(".sub-catalog").is(":hidden") == true){
$(".sub-catalog").slideUp();
$(this).parent().find(".sub-catalog").slideDown();
$(".category-wrap span").find(".fa").removeClass("fa-angle-down").addClass("fa-angle-right");
$(this).find(".fa").addClass("fa-angle-down");
View JQuery Alert Box
$(".btn_alert").click(function(){
var whitebg = document.getElementById("white_background");
var dlg = document.getElementById("dlgbox");
whitebg.style.display = "none";
dlg.style.display = "none";
setTimeout(function() {
$.fancybox.close();
}, 1000);
});
You can’t perform that action at this time.