cross-browser

Random letter spacing when using font-face

巧了我就是萌 提交于 2019-12-08 09:32:00
问题 I'm using CSS like this: @font-face { font-family: Chocolat; src: url('../fonts/chocolat.eot'); src: url('../fonts/chocolat.eot?#iefix') format('embedded-opentype'), url('../fonts/chocolat.woff') format('woff'), url('../fonts/chocolat.ttf') format('truetype'); font-weight: normal; font-style: normal; } html, body { line-height: 1; margin: 0; padding: 0; font: 15px Chocolat, Arial, Helvetica, sans-serif; color: #000000; } The page looks correct most of the time in IE7, IE8, IE9, and latest

IE iframe widget and jQuery drag and drop alignment issue

坚强是说给别人听的谎言 提交于 2019-12-08 07:33:07
问题 I have created a small widget using jQuery UI and drag-drop plugins. Now, I am finding some issues with IE. This widget can be accessed at - http://widget.adipa.com. At this URL, widget works well with IE7/8. But when I embed this widget inside the iframe, as done here, it starts giving misaligning tiles. In the image show below, it can be seen that tiles are placed with little white spaces in between - As seen here, between A and E, it has the white space. You can check the widget in iframe

set clipboard content in any browser

最后都变了- 提交于 2019-12-08 07:31:06
问题 I need to set my user's clipboard when they trigger an event on my webpage. I realize each browser has a different way to do this, so do you know of a library or code snippet that will achieve this cross-browser? 回答1: This article might help you with that : Copy to Clipboard with Javascript on Mozilla firefox and IE The basic idea is to : use window.clipboardData for Internet Explorer and use some flash component for Mozilla Seems that this doesn't work with Flash 10, though, from some

D3.js svg to canvas conversion

邮差的信 提交于 2019-12-08 06:46:28
问题 I'm trying to convert a d3.js visualization to canvas. The d3.js code can be found here: https://gist.github.com/3166265 Could somebody explain the basics of converting this visualization to canvas? I cannot use a program like canvg because the browser I'm targeting (android platform 2.3) cannot parse any SVG AT ALL. Therefore I need to convert this visualizatoin to Canvas. Any help that you can provide would be most appreciated... 来源: https://stackoverflow.com/questions/11620621/d3-js-svg-to

JQuery's Ajax function works in chrome but returns 404 in firefox

时间秒杀一切 提交于 2019-12-08 06:46:18
问题 I'm using a central ajax function to send ajax Post requests to a server. This is the code of the function: function postJson(url, jsObj, whenSuccess, whenError){ $.ajax({ type: "post", headers: { "Accept": "application/json, text/javascript, */*; q=0.01", "Content-Type": "application/json, text/javascript, */*; q=0.01" }, dataType: "json", url: url, data: JSON.stringify(jsObj), success: function(result){ if(whenSuccess !== undefined){ whenSuccess(result); } }, error: function(xhr){ if

Stop loading the page if Javascript is disabled

社会主义新天地 提交于 2019-12-08 06:40:43
问题 I have a Rails web app (Online Examination System). I have disabled Right click, selection, copy etc using JavaScript in the examination interface. So, I want my app to detect whether JavaScript is enabled on interface start up. I have checked it by using <noscript> tag as follows. <noscript> <meta http-equiv="refresh" content="5"> <div id="noscript_message" style="color: white; background-color: red;"> It is detected that Javascript is turned off in your web brower. Please turn it on to load

how to specify different css for ie

时光毁灭记忆、已成空白 提交于 2019-12-08 06:40:24
问题 I need to include different .css files for IE anf all other browsers. I tried the following but it doesn't work. <!--[if !IE]><!--> <link type="text/css" rel="stylesheet" href="css/my_style.css"> <!--<![end if]--> <!--[if IE]><!--> <link type="text/css" rel="stylesheet" href="css/my_style_IE.css"> <!--<![end if]--> 回答1: You can give css path this way for IE condition. <!--[if IE]> <link type="text/css" rel="stylesheet" href="css/my_style_IE.css"> <![endif]--> <!--[if !IE]> --> <link type=

Mozilla Firefox input radio button styling and default settings

ⅰ亾dé卋堺 提交于 2019-12-08 06:01:36
问题 I have various form elements on my page, but am having an issue with input radio buttons in Firefox. The radio buttons display perfectly in Safari and Chrome, but are entirely different in Firefox (circular instead of square!) and are :checked by default, which is also an issue. From my research, the use of -moz-appearance is widely recommended, but in this instance I can't find any answers that directly relate to my query. Any help would be greatly appreciated. Markup <form> <label class=

problem using AJAX call in IE6 and IE7 — I am asking the same question again, cause i did not get any solution before

梦想与她 提交于 2019-12-08 05:36:08
问题 I have this code, which is working fine in FireFox, chrome and IE8 but is it not working on IE6 and IE7. function GetXmlHttpObject() { //var xmlHttp = null; try { xmlHttp = new XMLHttpRequest(); } catch (e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function login() { alert("Entered Login()"); var url="http://server.com/ALUauth.php"; xmlhttp.onreadystatechange=statechangedLogin; xmlhttp.open("GET

Given a dom element, how could I flatten it in jquery and/or JavaScript?

╄→гoц情女王★ 提交于 2019-12-08 05:01:09
问题 Let's say I get an element from the dom: [<div id="generic-wrapper"> ... </div>] How could I flatten it to include all elements inside? EDIT: "generic-wrapper" is an arbitrary id, it could be anything. It could also be nested, as in wrappers within wrappers. EDIT2: I want the final array to include all of the content of the original array, just flattened. This includes the wrapper. Is there a systematic way to construct and iterate through an array such as the one I am describing? Thanks