Using JQuery to enable optgroup in CForms

Posted by & filed under Developer Blog.

CForms II is an extremely robust and useful plugin for WordPress. One of the main frustrations I’ve noticed people have with it is the lack of optgroup support with select boxes. I wrote this little piece of JQuery code that will allow you to enable optgroup: if($(".cform").length!=0){ $(".cform select option").each(function(){ if($(this).val() == "groupstart"){ var label… Read more »

jQuery.easing [jQuery.easing.def] is not a function

Posted by & filed under Developer Blog.

Error: jQuery.easing [jQuery.easing.def] is not a function Is caused when JQuery javascript doesn’t load before the plugin js. To fix it, you just need to go into the jquery.easing.1.3.js file and wrap it with $(document).ready(function() { … });$(document).ready(function() { … });

Using JQuery to reveal using a slide up effect

Posted by & filed under Developer Blog.

The slideUp() method in JQuery is intended to hide the element rather than reveal it. It is basically the opposite of slideDown() which “unhides” your element by sliding it down. As you can see on this blog, I have an “About Jason Gill” tab in my heading. When clicked, this tab reveals information about who… Read more »