Skip to content

Instantly share code, notes, and snippets.

$(".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");
var contactMe = (function() {
var init = function() {
_setUpListners();
};
var _setUpListners = function() {
};
.hamburger
padding: 16px 0
display: inline-block
cursor: pointer
transition-property: opacity, -webkit-filter
transition-property: opacity, filter
transition-property: opacity, filter, -webkit-filter
transition-duration: 0.15s
transition-timing-function: linear
font: inherit
<div class="hamburg-inner">
<button class="hamburger hamburger--collapse">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
$(".hamburger").click(function(){
$(this).toggleClass("is-active");
$(".main_mnu ul").slideToggle();
});
<?php
$idObj = get_category_by_slug('charity');
$id = $idObj->term_id;
?>
<?php echo get_cat_name($id) ?>
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>
// Cache selectors
var lastId,
topMenu = $(".main_mnu"),
topMenuHeight = topMenu.outerHeight() + 15,
// All list items
menuItems = topMenu.find("a"),
// Anchors corresponding to menu items
scrollItems = menuItems.map(function() {
var item = $($(this).attr("href"));
if (item.length) {
<div class="hidden">
<form id="callback" class="pop_form">
<input type="text" name="name" placeholder="имя" required><br>
<input type="text" name="phone" placeholder="телефон" required><br>
<button class="button">Заказать</button>
</form>
</div>
.hidden{
display: none;
$(".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);
});