This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Require plugins | |
| var gulp = require('gulp'), | |
| sass = require('gulp-ruby-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), | |
| jshint = require('gulp-jshint'), | |
| uglify = require('gulp-uglify'), | |
| imagemin = require('gulp-imagemin'), | |
| rename = require('gulp-rename'), | |
| concat = require('gulp-concat'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery.validator.addMethod("specialChar", function(value, element) { | |
| return this.optional(element) || /([0-9a-zA-Z\s])$/.test(value); | |
| }, "Este campo no admite símbolos ni caracteres especiales."); | |
| jQuery.validator.addMethod("lettersonly", function(value, element){ | |
| return this.optional(element) || /^[a-z áãâäàéêëèíîïìóõôöòúûüùç]+$/i.test(value); | |
| }, "Este campo solo acepta letras y espacios"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var isMobile = { | |
| Android: function() { | |
| return navigator.userAgent.match(/Android/i); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match(/BlackBerry/i); | |
| }, | |
| iOS: function() { | |
| return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | |
| // some code.. | |
| } | |
| //jQuery way | |
| $.browser.device = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Suponiendo que tenemos un contenedor con una imagen que nos indica que giremos el teléfono | |
| $(window).load(function(){ | |
| //al cargar la página evalúa si el ancho es mayor que el alto, lo que significaría que el teléfono esta en posición landscape | |
| if(window.innerWidth > window.innerHeight){ | |
| $('#turnPhone').fadeIn('fast'); | |
| } | |
| }); | |
| /*---------- Eventos en el cambio de orientación del dispositivo ----------*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($){ | |
| /* trigger when page is ready */ | |
| $(document).ready(function (){ | |
| // your functions go here | |
| var $animation_elements = $('.animation-element'); | |
| var $window = $(window); | |
| function check_if_in_view() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Smooth scrolling para anclas */ | |
| $('a.smooth').on('click', function(e) { | |
| e.preventDefault(); | |
| var $link = $(this); | |
| var anchor = $link.attr('href'); | |
| $('html, body').stop().animate({ | |
| scrollTop: $(anchor).offset().top | |
| }, 1000); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .object{ | |
| position:absolute; | |
| margin:auto; | |
| left:0; | |
| right:0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #logo | |
| position: absolute | |
| top: 50% | |
| left: 50% | |
| width: w = 150px | |
| height: h = 80px | |
| margin-left: -(w / 2) | |
| margin-top: -(h / 2) |
NewerOlder