Archive for the Plugins Category

JcubeiT – Plugin JQuery para hacer cubos con HTML5

Posted on June 15, 2010 by DamianNo Comments

Buenas tardes!! Como ven sigo experimentando y haciendo plugins para JQuery.

Hoy se me dio por hacer uno bastante gracioso basado en las explicaciones de lanrat acerca de como construir un cubo usando las nuevas propiedades CSS.

Su utilización es muy sencilla, tan solo necesitamos 3 objetos ( las caras visibles del cubo) dentro de un objeto contenedor. Dichos objetos pueden ser links , imágenes, otros divs, etc

<div class="cube">
<div><img src="1.jpg" /></div>
<div><img src="2.jpg" /></div>
<div><img src="3.jpg" /></div>
</div>

Una vez que tenemos nuestra estructura HTML armada debemos aplicar el plugin de la siguiente forma:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jcubeit.js"></script>
<script type="text/javascript">
$(document).ready(function(){
                           $('.cube').JcubeiT();
                         
                           });
</script>

Y voila!! Tendremos un cubo perfecto con el cual podremos hacer un poco más original nuestros diseños.

El plugin posee algunos valores por defecto que se pueden cambiar pasando opciones.

  • size:’200px’
  • background: ‘#666′
  • border: true
  • borderColor: ‘#000′
  • rounded: false

Podemos cambiar estos valores pasando las opciones como se suele hacer en JQuery

var opciones={ size:'100px' , border: false};
$('.cube').JcubeiT(opciones);

//o simplemente
$('.cube').JcubeiT({ size:'100px' , border: false});

Jugando con las opciones podremos crear por ejemplo una barra de menu más original

Pueden ver el ejemplo online o descargarse el código desde la página oficial de JQuery

ENGLISH

Hello!As you see im still experiencing and doing plugins for JQuery

Today I did a pretty funny one based on the explanations of lanrat about how to build a cube using new CSS properties.

Its use is very simple, you only need 3 objects (the visible faces of the cube) inside of a container object. Such objects could be links, images, other divs, etc.

<div class="cube">
<div><img src="1.jpg" /></div>
<div><img src="2.jpg" /></div>
<div><img src="3.jpg" /></div>
</div>

Once we have our HTML structure we have to apply the plugin like this:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.jcubeit.js"></script>
<script type="text/javascript">
$(document).ready(function(){
                           $('.cube').JcubeiT();
                         
                           });
</script>

And voila! We will have a perfect cube to be a little more original in our designs.

The plugin has some defaults values that can be changed via the options var.

  • size:’200px’
  • background: ‘#666′
  • border: true
  • borderColor: ‘#000′
  • rounded: false

We may change these values from the options as is usually done in JQuery

var opciones={ size:'100px' , border: false};
$('.cube').JcubeiT(opciones);

//or just
$('.cube').JcubeiT({ size:'100px' , border: false});

Playing with the options we can create for example a more original menu bar

You can check the online demo or download the plugin from JQuery

Tags: , ,

Filed Under: JQuery, Plugins

JQuery nightMode Plugin

Posted on May 1, 2010 by Damian3 Comments

Download JQuery nightMode Plugin

/////////////////////////ESPAÑOL //////////////////////

Anoche estaba aburrido y me puse a trabajar en un plugin para JQuery ya que nunca habia echo ninguno . Así nacio nightMode Plugin que es simplemente un script chiquitito que cambia el color de las letras y el fondo de pantalla. Con eso logramos ahorrar un poco de energia apagando algunos pixeles de nuestra pantalla y además nos facilita la lectura. Espero que les guste!!

El color tanto de las letras o el fondo se puede cambiar pasando opciones.

Uso:

 <a id="nightmode">Turn nightmode On/off</a>
 $(document).ready(function(){

               $('#nightmode').click(function(){
                           $('body').nightMode();
                });
 });

Tan solo cambiar body por cualquier selector válido

También se puede ejecutar con opciones

 var options={
      color: '#ffffff',
     background:'#ccc'
 }
 $('body').nightMode(options);

Pueden probar como funciona haciendo click en la lamparita que aparece en la parte superior derecha de mi blog :D

Descargar JQuery nightMode Plugin

////////////////////////ENGLISH/////////////////////////////

JQuery nightMode Plugin
its a funny tiny plugin that will allow you to change your background and letter colors for a night mode. Saving energy turning off pixels of your screen and allowing you to have a confortable read .

Letter colors and background can be moddified by options

Ussage:

 <a id="nightmode">Turn nightmode On/off</a>
 $(document).ready(function(){

               $('#nightmode').click(function(){
                           $('body').nightMode();
                });
 });

Just change body to any valid selector you wish

Can also be called with options:

 var options={
      color: '#ffffff',
      background:'#ccc'
 }
 $('body').nightMode(options);

You can try how it works by clicking on the light bulb on the top right corner of my blog :D
Download JQuery nightMode Plugin

Tags: , ,

Filed Under: JQuery, Plugins