cross-browser

how to get outerHTML with jquery in order to have it cross-browser

て烟熏妆下的殇ゞ 提交于 2019-12-11 04:32:00
问题 I found a response in a jquery forum and they made a function to do this but the result is not the same. Here is an example that I created for an image button: var buttonField = $('<input type="image" />'); buttonField.attr('id', 'butonFshi' + lastsel); buttonField.val('Fshi'); buttonField.attr('src', 'images/square-icon.png'); if (disabled) buttonField.attr("disabled", "disabled"); buttonField.val('Fshi'); if (onblur !== undefined) buttonField.focusout(function () { onblur(); }); buttonField

Serving raw swf files displays in Firefox but not in IE

拜拜、爱过 提交于 2019-12-11 04:29:31
问题 I have a case where I need to serve "raw" swf files to the browser. That is, without embedding. We have had some problems making this work in IE now and then but managed to work around it. Until now. We're fixing some other issues with serving documents and as a side effect the flash files stop working in IE. Flash controls the browser display area (you get the Flash context menu instead of IE:s) but the flash file doesn't render. I can't figure out what I've changed that made it stop working

*-transform: rotate works in Firefox but not chrome

允我心安 提交于 2019-12-11 04:28:04
问题 CSS looks as follows: .rotate { -webkit-transition: all .5s ease-in-out; -moz-transition: all .5s ease-in-out; -o-transition: all .5s ease-in-out; -ms-transition: all .5s ease-in-out; } .rotate:hover { -webkit-transform: rotate(90deg) scale(1); -moz-transform: rotate(90deg) scale(1); -o-transform: rotate(90deg) scale(1); -ms-transform: rotate(90deg) scale(1); } Hovering over a <span class="rotate"> will rotate the element in Firefox but not chrome. Demo: http://jsfiddle.net/BuHGQ/ (hover over

Some Google Map Markers not showing up in Internet Explorer but show up in all other browsers

萝らか妹 提交于 2019-12-11 04:21:13
问题 I have a Google Map on our site that has a list of markers which are brought in using the following code: $(".map-overlay-right").click(function () { var map = new GMap2(document.getElementById('map-holder')); $("#map-holder").fadeOut('slow', function(){ var gmarkers = []; map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); $.get("http://afid.staging.dante-studios.com/xml-feed-google-maps",{},function(xml) { $('marker',xml).each(function(i) { html = $(this).text();

Toggle two checkboxes with one click and without js

泪湿孤枕 提交于 2019-12-11 03:59:10
问题 Is there a way to toggle two combined checkboxes with one click? I have a small calander where I want to select weeks with checkboxes. One week can be in two month so I have two checkboxes for the same week. How can I combine them safe? I'm using this abstract HTML: <label for="aa"><input type="checkbox" id="bb" /></label><br /> <label for="bb"><input type="checkbox" id="aa" /></label> See my updated fiddle for a full example. This works fine in Firefox (exept you make a double click) in the

Flex-wrap issues on safari

喜欢而已 提交于 2019-12-11 03:52:11
问题 I'm trying to have two elements fill their container and wrap when they reach a certain minimum size. The code I have works perfectly on all browsers other than safari & I can't figure out an alternative. It appears to be an issue with flex-basis: 0 Here's the issue: http://www.cssdesk.com/RKeNY Both display differently in safari and chrome. When the container width is changed on safari the flex-wrap has no effect. 回答1: Try setting -webkit-flex:1 1 auto; instead of -webkit-flex:1; on the flex

can an element have a a decimal height in html/css?

别说谁变了你拦得住时间么 提交于 2019-12-11 03:35:19
问题 I am working on a site, when I look at it with firebug in firefox various elements seem to have heights like 133.8 pixels, whereas firebug lite in chrome reports the height as 133px for the same method. Is this a difference in the browser rendering, or is it just a curiousity brought on by firebug? I thought pixels had to be measured in integers... 回答1: You can have decimal values in units other than px . Like em, in, etc. 回答2: Funny thing. I just tried today and booth Chrome 25 and Firefox

what the proper cross-browser date format is for passing to new Date()

本秂侑毒 提交于 2019-12-11 03:35:09
问题 i did use var elems = $("#D li").toArray(); elems.sort(function(a, b) { var adate = new Date($(a).find('div.dateDiv').text()); var bdate = new Date($(b).find('div.dateDiv').text()); return adate > bdate ? -1 : 1; }); $("#D").html(elems); <div id="D"> <li>1<div class="dateDiv">2012-04-15 10:25:45</div><div>df</div></li> <li>2 <div class="dateDiv">2012-04-10 19:41:08</div><div>df</div></li> <li> 3 <div class="dateDiv">2012-04-20 07:00:10</div><div>ab</div></li> <li>4 <div class="dateDiv">2012

CSS hexagon not rendering correctly on Android

喜你入骨 提交于 2019-12-11 03:33:29
问题 I have created a pure css hexagon which renders fine on all browsers except on some Android Browsers e.g.: Galaxy Note. The rounded triangles created by the generated content are not rendered correctly. I have created a fiddle to show my code. http://jsfiddle.net/mistermelotte/r8X8c/ HTML <span class="hexagon"></span> CSS .hexagon { position: relative; margin: 1em auto; width: 80px; height: 55px; border-radius: 5px; background: #a0d1e6; display: block; } .hexagon:before { position: absolute;

IE10 strips out hashtag from the URL

ぃ、小莉子 提交于 2019-12-11 03:32:19
问题 we are building a website using a very restricted CMS. The only thing we can do is to manipulate the front end - play around with the template, use custom css and js. Since we cannot "memorise" user's choices, we came up with a solution to pass certain information via the URL using hashtags. This works smoothly on Google Chrome and Mozilla Firefox browsers but IE10 strips out the hashtag and jQuery fails to customize the page for the user. Here are some examples on how we use this thing: FORM