jQuery Testimonials Slider with Navigation and Effects using Cycle Plugin – Multiple Sliders on Same Page

Sometime back I put together a Text Testimonials Slider with Navigation using jQuery and Cycle Plugin. I got several requests of how to put several testimonials boxes on single web page. I have updated the original code and have provided different testimonials boxes with different effects. I have also added navigation styles to make the…

PHP Function to Clean Data before using in JavaScript or FBJS

Single quotes, double quotes, slashes and all kinds of other junk data will break your application code, especially the js and FBJS dialog boxes for sharing and components if the data is not cleaned properly. Following PHP function will clean your data for such garbage. function cleanData($data) { $cleaned = preg_replace(“/[^A-Za-z0-9\s\.\-\/+\!;\n\t\r]/”,””, $data); $cleaned = preg_replace(“/\s+/”,”…

How to show/hide content based on select onchange using jQuery

If you want a select drop down option to show/hide specific div contents, here’s a simple solution using jQuery. $(document).ready(function(){ $(“#select_id”).change(function(){ var test = $(this).val(); if(test==\’option value to show\’) { $(“#container”).show(“slow”); }else { $(“#container”).hide(“slow”); } }); HTML code will look something like this. Hey! here are your hidden contents. Cheers!