buy prednisone

Tag-Archive for » jquery «

IE bugs caused by CSS filter property fixed in jQuery 1.7

I assume that everyone knows about IE’s ‘filter‘ CSS property. We use it on IE< =8 mainly because they don’t support the W3C opacity property. The new jQuery 1.7 finally added a fix to an issue with IE’s ‘filter’ property. If you look at jQuery 1.7’s source code, you see that it does style.removeAttribute( “filter” ) when opacity is 1 upon setting the opacity csshook. The jQuery upgrade eliminates the need for us to do something like this: 1234j_obj.animate({opacity: 1}, 500, function() { $(this)[0].style.removeAttribute('filter'); // remove filter property at the end of animation... no longer needed in jQuery 1.7 and [ ... ]

Upgrading jQuery – from 1.4.x to 1.6.x

The jQuery library, specifically its architecture of Ajax handling, has been significantly re-written in 1.5. We at Box love jQuery, but we had to skip version 1.5 because a quick jquery.js file replacement failed many of our automated test cases. After a couple of weeks of debugging, we finally migrated to version 1.6.1. In this post, I want to share my experience upgrading jQuery from 1.4.4 to 1.6.1. prop() and attr() prop() is a new method to retrieve a property value of a DOM object, while attr() is used to retrieve attribute values written in the HTML source. attr() used [ ... ]

Popup blocker detection pattern

Have you ever wondered why popup blockers hate certain popup windows, but not others? The underneath formula is pretty simple: if a call is not on top of a click event in the call stack, popup blockers would block it unless it’s on the exception list. This can be verified using Firebug or Chrome Developer Tools. Call stack of triggered indirectly from a click event Call stack of triggered from an Ajax callback Therefore, the rule of thumb is that you should avoid calling from anything other than an user-initiated click event. What if it’s a [ ... ]

z-index misconceptions, IE bugs and fixes

Update (12/1/2011): Version 1.2 In the past 13 years, I have worked on numerous issues related to layering, specifically the z-index CSS property. It is one of the most misunderstood CSS properties. Surprisingly, there are not many well-written articles or tutorials on this topic. I came across this blog post that talks about the way to fix a z-index issue. It works as it nails the key point about the parent element, but there isn’t much explanation. You can find all the misconceptions written by other readers. To understand what z-index is, I find this to be the best beginner’s post. This post [ ... ]

Attaching events to disabled input elements

I encountered an issue that all the attached mouseover and mouseevent events on a disabled checkbox <input type=”checkbox” disabled=”disabled”/> failed to work. After verifying the issue from a few references, I confirmed that this is an expected behavior of a disabled form element (button, input, optgroup, option, select or textarea). Many argued that if a form element is disabled, it should not trigger any event. However, for various reasons, I just need it to trigger certain events. For example, I may want a tooltip to appear when you hover on a disabled field to explain why the field is disabled. This requires [ ... ]

innerHTML, innerText and textContent

innerHTML, innerText, textContent, html() and text()? Assuming we have a div block that contains two lines of text and a hyperlink. We want to enable inline editing so that we only edit the text and not HTML. div block for inline editing And when we click the edit action, we want to be able to edit it in a textarea. Welcome to! Hope you enjoy it! Obviously, if we use innerHTML (or jQuery’s .html()), the textarea would show: Welcome to <a target="_blank" href=""></a>! <br><br>Hope you enjoy it! inline editing that incorrectly shows HTML code I do not want HTML tags! What [ ... ]

jQuery Conference 2010: Key Takeaways

The past weekend is all about jQuery, JavaScript and web development. Similar to many other tech conferences, the jQuery conference at Microsoft’s campus in Mountain View allows developers to choose one of the two available sessions at a time slot. For me, making choices on weekends is often not desired, especially when I do not want to miss out anything. Here I am going to share the takeaways from half of the sessions I attended. Ads, widgets, and analytics – Steve Souders A similar talk on site performance was given earlier at JS Conf. See the recap here at Ajaxian. Steve recommended using [ ... ]