Skip to content

Instantly share code, notes, and snippets.

View jpcontrerasv's full-sized avatar
馃彔
Working from home

Juan Pablo Contreras Vald茅s jpcontrerasv

馃彔
Working from home
View GitHub Profile
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
@jpcontrerasv
jpcontrerasv / htaccess normal wordpress.txt
Created July 30, 2014 14:53
htaccess normal wordpress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@jpcontrerasv
jpcontrerasv / Seleccionar s贸lo el hijo que tiene las mismas clases repetidas.txt
Created July 30, 2014 14:53
Seleccionar s贸lo el hijo que tiene las mismas clases repetidas
$(".btn-funciona").click(function(event){
$(this).parent().next(".cover").animate({right:'0'}, 800).addClass("cover-abierto");
});
$(".cerrar-cover").click(function(event){
$(this).closest(".cover").animate({right:'-75%'}, 800).removeClass("cover-abierto");
});
@jpcontrerasv
jpcontrerasv / Usar children del parent.txt
Created July 30, 2014 14:53
Usar children del parent
$(".item-servicio").mouseover(function(event){
$(this).children('.color-falso').fadeOut('fast');
$('.color-falso').addClass('oculto');
});
$(".item-servicio").mouseleave(function(event){
$(this).children('.color-falso').fadeIn('fast');
});
@jpcontrerasv
jpcontrerasv / Loop Ultimos 7 d铆as .php
Created July 30, 2014 14:53
Loop Ultimos 7 d铆as
<?php
function filter_where($where = '') {
//only show posts published within the last 30 days
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-7 days')) . "'";
return $where;
}
add_filter('posts_where', 'filter_where');
// Query posts
query_posts( 'cat=3&posts_per_page=1&orderby=rand' );
@jpcontrerasv
jpcontrerasv / Transici贸n color Background.css
Created July 30, 2014 14:53
Transici贸n color Background
div {
transition: background-color 0.5s ease;
background-color: red;
}
div:hover {
background-color: green;
}
function get_custom_cat_template($single_template) {
global $post;
if ( in_category( 'category-name' )) {
$single_template = dirname( __FILE__ ) . '/single-template.php';
}
return $single_template;
}
add_filter( "single_template", "get_custom_cat_template" ) ;
.ul {
overflow: hidden;
text-align:center;
}
.ul li {
display:inline-block;
*display:inline; /*IE7*/
*zoom:1; /*IE7*/
overflow:hidden;
$(".catsm").mouseover(function(event){
if($('div.dummysm').hasClass('ocultar'))
{
$('div.dummysm').removeClass('ocultar');
$('div.dummysm').addClass('mostrar');
}
});