PHP Classes

File: web/bundles/bootstrap/vu/js/centrar.js

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/bundles/bootstrap/vu/js/centrar.js   Download  
File: web/bundles/bootstrap/vu/js/centrar.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 523 bytes
 

Contents

Class file image Download
(function($){ $.fn.centrar = function(){ var elemento = $(this); cambiarCss(); $(window).bind("resize", function(){ cambiarCss(); }); function cambiarCss(){ var altoImagen = $(elemento).height(); var anchoImagen = $(elemento).width(); var anchoVentana = $(window).width(); var altoVentana = $(window).height(); $(elemento).css({ "position" : "absolute", "left" : anchoVentana / 2 - anchoImagen/ 2, "top" : altoVentana /2 - altoImagen / 2 }); }; }; })(jQuery);