It's very easy with jQuery to add style to elements; based on the selector the style is applied via the css method. It got me thinking that if the jQuery object based on the selector returns a huge number of elements it would be slow to apply the style to let's say 10.000 elements, not to mention searching the DOM for elements which apply to the selector.
Can this be done more efficient or faster?
1 commentsBesides the jQuery framework I use other (3rd party) client objects like user controls.
When a certain object is not providing callbacks mechanisms before or after events are executed (for example setting the height of the control) and you want to hook into that event, you have to do it via other constructions.
There is a new method to bind events in jQuery 1.4.2. It's a replacement for the live method. The two methods will work the same in essence; it can trigger events on (future) elements.
What is the difference exactly?
0 commentsSometimes you want to have values in a DropDownList which are all the values of an enum.
Here is an example on how to set the datasource of an element to an enum.
0 commentsThe recent change in jQuery 1.4.2. for handling change events for inputs, textboxes and textareas is one of the changes I don't like. The idea is that a checkbox for example gets the change event triggered right after you clicked the element. For a user a change in the value of the element; it's getting checked or unchecked.
Normally the change event will only trigger after 'blurring' the element. It's the normal behaviour of he browser. jQuery's solution is (in some cases) usefull but I had issues with this new change.
0 commentsjQuery provides some very powerful selectors using colon (:) syntax. Things like :first and :last will give you only the first or last element of the selector. The :odd, and :even will give you all odd or even elements from the selector (ideal for alternating colors in tablerows : zebrastriping).
What's even cooler; you can add your own selectors by extending the jQuery.expr[':'] object.
0 commentsHaving a jQuery plugin inside an ASP.NET UpdatePanel can be a hassle.
$(document)ready will only work once; after the page is loaded, not after a partial postback.
Here's how to handle the situation.
0 commentsYesterday I discovered some unexpected behaviour using the test method of the regular expression object in JavasScript.
0 commentsThe ASP.NET TreeView control is a powerfull control. Apart from how it's rendered you will have the ability to show checboxes on treenodes. Only checkboxes? Why not radiobuttons...
6 comments