Para que no se me olvide la sintaxis:
<script type="text/javascript">
$(document).ready(function(){
var $alturaSidebar = $("#sidebar").height()-20;
$("#content").css("min-height", $alturaSidebar );
});
</script>
jueves, 27 de septiembre de 2012
lunes, 24 de septiembre de 2012
Borrar valor por defecto de un input con jquery
<script type="text/javascript">
$(document).ready(function(){
$('input').each(function(){
// tomamos el valor actual del input
var currentValue = $(this).val();
// en el focus() comparamos si es el mismo por defecto, y si es asi lo vaciamos
$(this).focus(function(){
if( $(this).val() == currentValue ) {
$(this).val('');
};
});
// en el blur, si el usuario dejo el value vacio, lo volvemos a restablecer
$(this).blur(function(){
if( $(this).val() == '' ) {
$(this).val(currentValue);
};
});
});
});
</script>
miércoles, 5 de septiembre de 2012
Códigos para poner the_time en wordpress
| Day of Month | ||
|---|---|---|
| d | Numeric, with leading zeros | 01–31 |
| j | Numeric, without leading zeros | 1–31 |
| S | The English suffix for the day of the month | st, nd or th in the 1st, 2nd or 15th. |
| Weekday | ||
| l | Full name (lowercase 'L') | Sunday – Saturday |
| D | Three letter name | Mon – Sun |
| Month | ||
| m | Numeric, with leading zeros | 01–12 |
| n | Numeric, without leading zeros | 1–12 |
| F | Textual full | January – December |
| M | Textual three letters | Jan - Dec |
| Year | ||
| Y | Numeric, 4 digits | Eg., 1999, 2003 |
| y | Numeric, 2 digits | Eg., 99, 03 |
| Time | ||
| a | Lowercase | am, pm |
| A | Uppercase | AM, PM |
| g | Hour, 12-hour, without leading zeros | 1–12 |
| h | Hour, 12-hour, with leading zeros | 01–12 |
| G | Hour, 24-hour, without leading zeros | 0-23 |
| H | Hour, 24-hour, with leading zeros | 00-23 |
| i | Minutes, with leading zeros | 00-59 |
| s | Seconds, with leading zeros | 00-59 |
| T | Timezone abbreviation | Eg., EST, MDT ... |
Excluir una categoría de la página principal de wordpress
En el functions.php, agregar lo siguiente, cambiar el número o números de la o las categorías a excluir:
function excludeCat($query) { if ( $query->is_home ) { $query->set('cat', '-8,-12'); } return $query; } add_filter('pre_get_posts', 'excludeCat');
lunes, 3 de septiembre de 2012
Suscribirse a:
Comentarios (Atom)