modernizr

HTML5 input validation doesn't work in IE8

ⅰ亾dé卋堺 提交于 2019-11-29 02:27:06
Hello kind people of the internet, I've been hacking at this for a while...and have seen several similar postings, but I can't seem to figure this out: The HTML5 input field validation CSS works in Firefox, Chrome...but alas, not in IE8...and much of my target audience will be using IE8. ...and yes: I'm using Modernizr, and I used Initializr to get the page template and CSS...I'm a bit confused why I can't get things working properly in IE8. Here's a link to my test page: Test html5 page The input field is red before proper entry, then validation simply turns green when input a valid account

How to test for Touch-Events now that Chrome fails standard tests?

倾然丶 夕夏残阳落幕 提交于 2019-11-28 20:49:19
I used to rely on var supportsTouch = 'ontouchstart' in document; to test for touch support in mobile and desktop browsers. Based on that test I bind eventListeners to click- or touch-events. This works fine in ALL current browser versions but the latest update to Chrome Canary (24.0.1275.0 canary) and of course the DEV version fail this test. I checked on the current modernizr test but that returns a false positive as well, meaning it states that chrome supports touch even though the feature is disabled. My current workaround is to test for any kind of mobile browser first and only if that

Click to call html

瘦欲@ 提交于 2019-11-28 17:11:43
I want to use html5 tag in my website for mobile view when user click on this link from mobile device it will place a call on the given number.. <p>Book now, call <a href="tel:01234567890">01234 567 890</a></p> What should I do to hide this link when user mobile is non html5.. I have gone through modenizer but seems it will not detect the link attribute. http://www.tutorialspoint.com/html5/html5_modernizr.htm Any suggestion? This button will only appear when my website is opened on mobile device and for mobile devices I want to hide this link when opened in old mobile.. tl;dr What to do in

Modernizr, html5shiv, ie7.js, and CSS3 Pie. Which to use and when?

南笙酒味 提交于 2019-11-28 15:09:58
I'm just starting to use HTML5 and CSS3 in my documents. I understand the need for JavaScript to bring Internet Explorer up to speed with these new tags and styles, but I don't know which to use and when! My plan was to use html5shiv and IE9.js to look after the HTML5 tags as well as the transparent pngs (and whatever other pesky errors they fix) but then Modernizr and CSS3 Pie were brought to my attention. My question is, if I use Modernizr, does it look after my need for html5shiv as well as IE9.js? Or should I include these as well? What is the overlap, if any? And what does CSS3 Pie do

Why isn't Modernizr working for me?

醉酒当歌 提交于 2019-11-28 10:31:00
I don't think modernizr likes me, can someone please tell me what i'm doing wrong. I can't seem to get modernizr to work on firefox, ie etc... I'm only using elements like header, footer and nav... This is my code: <!DOCTYPE html> <!--[if lt IE 7 ]> <html class="ie ie6 lte9 lte8 lte7 no-js"> <![endif]--> <!--[if IE 7 ]> <html class="ie ie7 lte9 lte8 lte7 no-js"> <![endif]--> <!--[if IE 8 ]> <html class="ie ie8 lte9 lte8 no-js"> <![endif]--> <!--[if IE 9 ]> <html class="ie ie9 lte9 no-js"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html class="notie no-js"> <!--<![endif]--> <head> <title><

Modernizr.load Deprecated. Yepnope.js Deprecated. Now what?

廉价感情. 提交于 2019-11-28 04:47:34
问题 Prior to Modernizr v3, I was using yepnope.js Modernizr.load and yepnope.js have both been deprecated. How do we conditionally call stylesheets or javascript files now? Example that worked with Modernizr v2.5.3: Modernizr.load({ test: Modernizr['object-fit'], nope: ['./dist/scripts/object-fit.js'], complete: function(){ if (!Modernizr['object-fit']) { jQuery(".poster img").imageScale({ scale: "best-fill", rescaleOnResize: true }); } } }); 回答1: There's a new syntax and the feature names are

Detecting html5 audio support with Modernizr

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 01:02:32
问题 Is it possible to detect if the browser has Html5 Audio support through Modernizr? If so how is this done? If not are there any work around's? There's few resources on Google explaining this, so any help would be appreciated. 回答1: Yes, through modernizr.audio. It supports a number of audio formats (currently ogg, mp3, m4a & wmv). Example: var audio = new Audio(); audio.src = Modernizr.audio.ogg ? 'background.ogg' : Modernizr.audio.mp3 ? 'background.mp3' : 'background.m4a'; audio.play(); More

Support 'background-size' property on older browsers?

纵然是瞬间 提交于 2019-11-27 22:20:35
问题 Is there a way that I can use the CSS3 'Background-Size' property and then use something like Modernizr to ensure that it's supported in older browsers (in particular I want to use 'background-size: cover' option)? I took a look at cssFx, which is mentioned from the Modernizr website, but this only seems to add vendor prefixes for browsers which need them to use a property, rather than allowing browsers such as IE8 to support the background size property. Also looked at CSS3Pie, but that

How to test for Touch-Events now that Chrome fails standard tests?

让人想犯罪 __ 提交于 2019-11-27 20:47:08
问题 I used to rely on var supportsTouch = 'ontouchstart' in document; to test for touch support in mobile and desktop browsers. Based on that test I bind eventListeners to click- or touch-events. This works fine in ALL current browser versions but the latest update to Chrome Canary (24.0.1275.0 canary) and of course the DEV version fail this test. I checked on the current modernizr test but that returns a false positive as well, meaning it states that chrome supports touch even though the feature

jquery 1.9.0 and modernizr cannot be minified with the ASP.NET Web Optimization Framework

微笑、不失礼 提交于 2019-11-27 20:02:21
问题 We are using the ASP.NET Web Optimization Framework with bundles and minification. One bundle just contains jquery and modernizr. This all worked fine with jquery 1.8.3 but since we updated to 1.9.0 the combination jquery/modernizer bundle is not working anymore. bundles.Add(new ScriptBundle("~/st-scripts-load-first.js") .Include("~/Resources/JavaScript/jquery-1.9.0.js", "~/Resources/JavaScript/modernizr.form-placeholder.js")); We have both jquery-1.9.0.js and jquery-1.9.0.min.js in the