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
| <!-- Iphone (classic & retina) --> | |
| <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=0.5,minimum-scale=0.3, maximum-scale=0.7"> | |
| <!-- Android (tested on HTC desire S) --> | |
| <meta name="viewport" content="width=device-width,height=device-height,target-densitydpi=high-dpi,user-scalable=no,initial-scale=0.05,minimum-scale=0.001, maximum-scale=0.5"> |
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($) { | |
| // Used by dateinput | |
| $.expr = {':': {}}; | |
| // Used by bootstrap | |
| $.support = {}; | |
| // Used by dateinput | |
| $.fn.clone = function(){ | |
| var ret = $(); |
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 () { | |
| // Mock necessary parts of zepto for fx module | |
| window.Zepto = function () { return $(arguments) } | |
| window.Zepto.isObject = function () { return false } | |
| window.Zepto.each = $.each | |
| window.Zepto.extend = $.extend | |
| window.Zepto.fn = {} | |
| /* |
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
| <?php | |
| $deviceClass = ""; | |
| $graduateLevelClass = ""; | |
| if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT']) || ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) { | |
| $deviceClass = "ui-iphone"; | |
| } else if (ereg('iPad',$_SERVER['HTTP_USER_AGENT'])) { | |
| $deviceClass = "ui-ipad"; | |
| } else if (ereg('Android',$_SERVER['HTTP_USER_AGENT']) && ereg('Mobile Safari',$_SERVER['HTTP_USER_AGENT'])) { | |
| $deviceClass = "ui-android"; | |
| }; |
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
| // From Lindsey Simon | |
| /** | |
| * This is a hack to make text input focus work in Android/PhoneGap | |
| * where calling el.focus() doesn't actually have the blinking cursor | |
| * effect = scumbag. | |
| * @param {Zepto} $el A zepto element. | |
| */ | |
| ws.focus = function($el) { | |
| var el = $el.get(0); | |
| el.focus(); |
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($){ | |
| $.fn.highest = function() { | |
| var height, highest = 0; | |
| this.each(function() { | |
| height = $(this).height(); | |
| if (height > highest) highest = height; | |
| }); | |
| return highest; | |
| }; | |
| })(window.Zepto || window.jQuery); |
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
| // Fix to make zepto work with ujs-jquery | |
| $.fn.ajaxSend = function(callback) { | |
| return this.each(function(){ | |
| $(this).on('ajaxBeforeSend', callback); | |
| }); | |
| }; | |
| var jQuery = $; |
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 mapLink = "http://maps.google.com/maps?z=12&t=m&q=loc:" + lat + "+" + lon | |
| if ($.os.ios && navigator.userAgent.match(/iPhone OS 6_/)) mapLink = "Maps://?q=" + lat + "," + lon | |
| if ($.os.android) mapLink = "geo:" + lat + "," + lon + "?z=12&q=" + lat + "," + lon | |
| // assumes you have zepto and zepto.detect loaded | |
| // also you should use target=_blank on your <a> tags |
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
| // Adds a matchHeight method to jQuery/zepto. | |
| // Takes a jquery/zepto collection and makes them all as tall as the tallest elements | |
| // Ideal for equal column layouts | |
| // ## Paramaters | |
| // * None (run on a zepto collection instead) | |
| // ## Returns | |
| // The collection which it was run on | |
| // ## Example | |
| // $('#myDiv1, #myDiv2').matchHeight(); | |
| // #test |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>title</title> | |
| <script src="https://raw.github.com/madrobby/zepto/v0.7/src/zepto.js"></script> | |
| <script> | |
| $(document).ready(function(){ | |
| console.log('READY IN THE HEAD', document.readyState); | |
| }); |
OlderNewer