I decided to dig into the new official jQuery Template Plugin developed from Microsoft yesterday. After I finally got the darn thing to work it makes inserting formatted HTML populated with data way easier. After doing some searches on Google I kept finding articles that announce that Templates would be built into the version 1.5 [...]
Archive for the ‘JavaScript’ Category
jQuery Templates
Posted: March 22, 2011 in JavaScriptTags: CDN, Google, jQuery, Microsoft, plugin, Template
I ran into a blog entry today by David B. Calhoun on “How to spot outdated Javascript”. I found it to be such a great resource that I had to put it here so I can always reference it. There’s a gazillion references out there on how to do things in JavaScript, but hardly all of them [...]
I needed to validate if an end date was greater than or equal to a start date. To do this I was using: This was working up until the point the years where different. For example “12/1/2010″ to “12/2/2010″ would work but not “12/1/2010″ to “1/1/2011″. To fix this issue I needed to create a [...]
On occasion I clone DOM elements to repeat form sections dynamically. During this I need to increment the name and id attributes so I can reference them later on. For example: name=”txtField1″ becomes “txtField2″ To make this happen I use a little but of slick jQuery magic. This increments the id and name attributes and [...]
When performing a .trim() function on a string pulled via the .text() tag in jQuery, will convert into a special space that will not be removed. Example: I was able to catch the Unicode character, which ended up being 160, by using: After performing a regex replace on the string, I was able to [...]
I have a form that clones a div upon clicking an add button. For validation I use the jquery.validate plugin. When the add button is clicked, I exectute the following to clear the errors. However, if inline errors are displayed before this being called, and then they are displayed again after the form is reset, [...]
When implementing jQuery UI’s datepicker in a dynamic form, you may notice that it will break as you bind it to new elements. The datepicker method adds a “hasDatepicker” class which must be removed first. This example finds all the elements with a “datePicker” class and removes the “hasDatepicker” class from the element. It then calls [...]
Last night’s jQuery Meetup was once again pretty awesome. Thanks again to BrightMix for hosting it and providing the Pizza and to Jonathan Sharp for making it all happen. Andrew from Blue Cross Blue Shield presented on AJAX. He showed us his concept of building a global jQuery handler using a Namespace. This would allow other programmers in [...]
I have a selection list, that once selected I would like to remove or disable the option choosen. However, at a later time I may want to add or enable it again. There is a bug in Internet Explorer that does not allow you to use the .hide() method on an option. It works just [...]
Thanks to BrightMix for hosting the jQuery meetup presented by Jonathan Sharp last night in Omaha. Jonathan presented on the new features of jQuery 1.4 last night along other Q&A topics. Lately I’ve been experimenting with the Google CDN for delivering jQuery and jQuery UI. The reasons behind using the CDN is faster library loads, cross-internet [...]