Skip to content

Instantly share code, notes, and snippets.

@Itachicz11
Itachicz11 / my_effect.js
Created March 8, 2012 20:53
This is my menu.js file
horni_menu_li.on('mouseover',function(){
$(this).find('ul.sub-menu').stop().css({visibility: "visible",display: "none"}).slideDown(180);
});
horni_menu_li.on('mouseleave',function(){
$(this).find('ul.sub-menu').stop().slideUp(180);
});
@Itachicz11
Itachicz11 / menu_function.js
Created March 8, 2012 20:57
This is my js file
jQuery(document).ready(function($) {
var horni_menu_li = $('#mine_menu #menu-horni-menu li')
horni_menu_li.hover(
function(){$(this).find('ul.sub-menu').css({visibility: "visible",display: "none"}).slideDown(180)},
function(){$(this).find('ul.sub-menu').slideUp(180)}
);
});
@Itachicz11
Itachicz11 / page-blog_fullwidth.php
Created March 12, 2012 19:12
This is my page-blog_fullwidth.php (it is just simple page template)
<?php
/*
Template Name: Blog full width
*/
?>
<?php get_header();?>
<div id="title_container" class="grid_12">
<h2><?php the_title(); ?></h2>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post', 'posts_per_page' => 4);
$loop = new WP_Query($args);
$loop->query( 'showposts=10&cat='.$category_id.'&paged='.$paged );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php $thumbnail_url = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'fullsize', false, '' );
$thumbnail_url = $thumbnail_url[0]; ?>
@Itachicz11
Itachicz11 / page-blog_fullwidth.php
Created March 14, 2012 22:16
my page-blog_fullwidth.php with pagination problem
<?php
/*
Template Name: Blog full width
*/
?>
<?php get_header();?>
<div id="title_container" class="grid_12">
<h2><?php the_title(); ?></h2>
@Itachicz11
Itachicz11 / add_meta_box.php
Created March 19, 2012 22:12
This si my add_meta_box.php
<?
// Add the Meta Box
function add_custom_meta_box() {
add_meta_box(
'image_metabox', // $id
'Image metabox', // $title
'show_custom_meta_box', // $callback
'hlavni_clanky', // $page
'normal', // $context
@Itachicz11
Itachicz11 / wordprses menu html output
Created April 14, 2012 12:58
This is HTML output of my wp menu
<div id="mine_menu" class="span12">
<div class="menu-hlavni-menu-container">
<ul id="menu-hlavni-menu" class="menu">
<li id="menu-item-83" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-77 current_page_item menu-item-83"><a href="http://localhost/Vectoryl/">Home</a></li>
<li id="menu-item-134" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current_page_ancestor menu-item-134"><a href="http://localhost/Vectoryl/?page_id=132">Blog</a>
<ul class="sub-menu" style="display: block; ">
<li id="menu-item-72" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-72"><a href="http://localhost/Vectoryl/?page_id=70">Blog three columns</a></li>
@Itachicz11
Itachicz11 / accordion.js
Created April 29, 2012 17:33
accordion.js
/* =============================================================
* bootstrap-collapse.js v2.0.3
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@Itachicz11
Itachicz11 / index.html
Created April 29, 2012 17:34
html output
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Collapsible Group Item #1
</a>
</div>
<div id="collapseOne" class="accordion-body in collapse" style="height: auto; ">
<div class="accordion-inner">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you
@Itachicz11
Itachicz11 / other.js
Created April 29, 2012 21:17
That's how i call my accordions
$(function() {
$('.accordion').collapse()
});