I needed to come up with a generic way of checking all checkboxes that could be reused using jQuery. At first I thought about using the data- attribute to define which class of checkboxes to check. But then found a great way to just check all checkboxes that are located in their element container. (The [...]
Archive for the ‘JavaScript’ Category
Using the Galleriffic version 2.0.1 you will find it incompatible with the 2010-09-11 jQuery History plugin. It currently only works with the 2009 history plugin version. When you insert the pageload function and its calls into your HTML, update it to the following. Lines 3 and 15 are updated. Then update jquery.galleriffic.js: Line 495: Line [...]
If you use the range attribute inline to validate against using the jquery.validate plugin 1.8.1, your validation will probably always fail and receive the message “Please enter a value between NaN and {1}.” or ”Please enter a value between {0} and NaN.”. This drove me nuts for almost a whole day looking for a fix. I finally got [...]
The jquery.validate plugin currently has the validation method “date” which will correctly validate the format “xx/xx/xxxx”. However you can enter a date such as “40/01/2011″ and it will pass. Obviously there is no month 40 or even day 40. Borrowing from the “dateITA” validation method in the additional-methods.js I created a “dateUS” validation method that will detect [...]
Returning Multiple Value Elements to ColdFusion Remote Method via jQuery AJAX
Posted: June 7, 2011 in ColdFusion, JavaScriptLets say I have a select element that supports multiple selected values: I wish to return this information to my ColdFusion CFC that contains a remote method via AJAX: My CFC method looks like: This solution will error out due to the fact that the key “value” passed via AJAX is actually passed as “value[]“. [...]
jQuery 1.6.1 RC1 was released today, helping resolve the .attr() backwards compatibility issue along with a few other fixes. jQuery.com released a nice chart on what .attr() and .prop() should be used for going forward from jQuery 1.6+. I thought I’d publish this for future reference. Note that all properties can still be accessed via [...]
jQuery 1.6 released a significant change to the way it handles DOM attributes and properties. Take for example in version 1.5.2, the following code would return isCheckedAttr as “true”. In version 1.6 the addition of .prop() and .removeProp() changes what the .attr() method will return when referencing DOM properties. The following example will return isCheckedAttr as “” [...]
Lately I’ve had to deal with jQuery conflicting with Prototype. For starters I was forced to upgrade from jQuery 1.4.2 to 1.5.2 to fix a conflict when doing clones. But of course there’s always the ‘$’ conflict. So I wanted to come up with a slick way of keeping the ‘$’ alias available for use [...]
I am currently using ColdFusion Builder 2 Beta for my primary projects. One item I noted was the lack of jQuery code assist. I did find a way to turn code assist on for jQuery 1.3. After some research I really haven’t found a way to include 1.4, 1.5 or 1.6RC. But 1.3 is better [...]
Many sites include what are known as AJAX Spinners. They are little graphics that show up on a web page that show something is happening behind the scenes. This is most commonly used when an AJAX request is being made and the end-user is waiting for a response. There are many different ways you can [...]
