cross-browser

Javascript - "let" keyword vs "var" keyword

In javascript 1.7, the let keyword was added. I've heard it described as a "local" variable, but I'm still not quite sure how it behaves differently than the var keyword. What are the differences between the two? When should let be used over var? ...

HTML border differences in FF and IE

I'm having some trouble identifying the problem with my html code. I've created a table and it is like this on Internet Explorer (which is the result I'm looking for): But it comes up like this on Firefox: ...and I don't know how to fix this. Please help, thanks. ...

Truncating long strings with CSS: feasible yet?

Is there any good way of truncating text with plain HTML and CSS, so that dynamic content can fit in a fixed-width-and-height layout? I've been truncating server-side by logical width (i.e. a blindly-guessed number of characters), but since a 'w' is wider than an 'i' this tends to be suboptimal, and also requires me to re-guess (and kee...

javascript WYSIWYG HTML editors?

What are the options for something that will let users make text bold/italic/underline/etc as they are writing in a textarea and work in all browsers? ...

What is the correct way to deal with css browser compatibility?

Is it better to have a different CSS file for each user-agent or is it better to use CSS Hacks that only certain browsers can see? ...

Can't dynamically add rows to a <TABLE> in IE?

I have an AJAX application that downloads a JSON object and uses the data to add rows to an HTML <table> using Javascript DOM functions. It works perfectly... except in Internet Explorer. IE doesn't give any sort of error, and I've verified as best as I can that the code is being executed by the browser, but it simply has no effect. I cr...

service for seeing what a site looks like in IE7?

Are there any good services that you can use during development to try out how your site renders in different browsers? We develop on macs. I'd like to be able to pay $20 a month or something like that and be able to VNC in and test my site in IE6, IE7, Opera, etc without having to keep a windows box around. ...

regular expression in javascript string split, browser compatibility issue

I've been investigating this issue that only seems to get worse the more I dig deeper. I started innocently enough trying to use this expression to split a string on HTML 'br' tags: T = captions.innerHTML.split(/<br.*?>/g); This works in every browser (FF, Safari, Chrome), except IE7 and IE8 with example input text like this: is inv...

Internet explorer and floats: please explain

Yesterday someone asked Width absorbing HTML elements. I presented two solutions: one table-based and one pure CSS. Now the pure CSS one works well in Firefox and Chrome but not in IE. Basically the floats are being bumped down to the next line. It is my understanding (and the behaviour of FF and Chrome) that this should not be the case...

jQuery Animation Error on Cloned Elements

Hi there, In Firefox, this seems to be working fine - but Safari, Opera & Chrome all had issue. An error will be thrown by jQuery.ui (Line 3181) which controls the colour changing of elements, i.e. the "Highlight" effect. This only happens when trying to clone and highlight the clone in the same action, i.e. $(targetStory).after(target...

CSS To Add Underline After Header Content

Problem I am working on a project to theme a website, but I am not allowed to change the HTML or JavaScript. I can only update the CSS stylesheet and add/update images. Requrements I need to style a h3 tag to have an underline/border after the content. This h3 will be used multiple times on the page, so the conent length can vary T...

Simple jQuery Hide/Show does not work in IE

$(document).ready(function(){ $('#createGallery').hide(); $("#newGallery").click(function () { $("#createGallery").show('slow'); }); $("#gallerySelect > option").not("#newGallery").click(function () { $("#createGallery").hide('slow'); }); }); I can't figure out why. Seems easy enough. my HTML is in HAML. But its easy to unde...

Prevent javascript execution in IE6

Hi! I want to prevent some parts of my javascript, written with jQuery if that matters, from executing in IE6. What are the prefered methods to accomplish this? Thanks! ...

Browser portability problems

I have a problem with my CSS on a website I'm working on. For some reason the website's CSS works for FF 3 and IE 7 but of course MS complicates things as this doesn't work for IE 6. The header looks squashed. The trouble is that my client owns IE 6 and I was yelled at without knowing why. My questions are: Where can I get a test suite...

Cross-browser method for detecting the scrollTop of the browser window

What is the best cross-browser way to detect the scrollTop of the browser window? I prefer not to use any pre-built code libraries because this is a very simple script, and I don't need all of that deadweight. ...

CSS - Do non-IE browsers support the "filter" attribute?

IE5.5+ has supported the CSS attribute "filter" where you convert a color image into grayscale using just CSS. filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); Do other browsers support a similar CSS tag without using JavaScript? ...

Performance issues in javascript onclick handler

I have written a game in java script and while it works, it is slow responding to multiple clicks. Below is a very simplified version of the code that I am using to handle clicks and it is still fails to respond to a second click of 2 if you don't wait long enough. Is this something that I need to just accept or is there a faster way t...

Wanted: Resource for documented Cross-Browser differences

Where can I get a list of browser differences in the implementation of DOM? ...

The "select" element and cross browser transmitting of the data

I've always provided a value="something" for my option elements within a select element. Like so <select> <option value="true">True</option> </select> Now that I have made one with countries, there is a lot of extraneous data in there. I'm pretty sure if I remember correctly, that Firefox will send the text between the tags if a v...

Is it possible to check for PNG support with jQuery.Support?

My question is regarding the jQuery Support system. I'd like to know if it is possible to tell whether or not the browser will support semi-transparent background PNG images using this method. Edit: I am not interested in CSS solutions to a specific problem. I'd like to know if the jQuery support checking system can check this. I app...