MainelyDesign.com Blog

Jquery Tagged Blog Posts

Best Approach to Dynamic Javascript in CakePHP Views

Posted on 05/29/2010 at 12:36 pm | Viewed 3,759 times | 5 comments

I always knew in the back of my mind that there was a better way of creating dynamic javascript than the method I was using.  CakePHP has a great function as part of the $View controller:  $View->addScript($jscript, false) will add a script block to your template header.  This is the command I use to send javascript created in a Cake view up to the header, which is where most javascript should live.  The best approach to adding dynamic javascript to your CakePHP views is to implement PHP's output buffering, combined with $View->addScript().

Using Jquery for target="_blank" and strict xHTML

Posted on 12/28/2009 at 03:27 pm | Viewed 2,775 times | 0 comments

If you like to see the little green check mark that HTML Validator shows when your HTML is 100% valid, you'll love this little trick. Thanks to badlydrawntoy.com

Upgrading Jquery UI Tabs and it Stopped Working

Posted on 12/09/2009 at 08:16 pm | Viewed 1,803 times | 1 comment

I was upgrading the version of Jquery UI that I use with Site Avenger.  The last time I was in a rush, nothing seemed to work and I rolled the changes back.  This time, I took the time and decided to finally make this Jquery UI upgrade happen.  This time everything went swell, except my Jquery UI tabs plugin stopped working.  WTF?

Jquery Accordion Menu - Expanding UL Menu

Posted on 11/17/2009 at 01:25 pm | Viewed 9,320 times | 2 comments

I looked around and found some interesting examples and existing plugins for creating an accordion menu in Jquery.  What I was looking for was a nested unordered list (UL) that would collapse and expand based on which menu item was clicked.  If there wasn't a child UL, then the menu link should be clickable, instead of an accordion.  Sounds simple right?

Jquery Direct Descendant Selector (using the >)

Posted on 11/17/2009 at 01:08 pm | Viewed 2,302 times | 0 comments

I'd been struggling with a very simple accordion menu script.  The problem was that I couldn't stop all of the links from returning false, when I only wanted to top link to return false.  Let me show you my code:

$('div#sideNav li:has(ul) a').click(function() {
	return false;
});

Auto Columns with Columnizer - My New Favorite Jquery Plugin

Posted on 09/30/2009 at 10:37 am | Viewed 4,666 times | 2 comments

I was about to start coding a CakePHP helper that would analyze a bulleted list and split it into columns.  Starting to think about how I would approach this problem, my head began to hurt.  Then I found an awesome jQuery plugin- columnizer.

Changing Filetypes Shown in SWF Upload File Browser

Posted on 08/25/2009 at 04:17 pm | Viewed 2,034 times | 0 comments

It's easy to change which file types are allowed to show up (and are displayed) when you browse for files to upload through SWF Upload.  SWF Upload makes it easy to upload multiple files in PHP.

I just had to hunt through some source files until I found this in my SWF Upload config. (goes in the new SWFUpload() function)

Full Tag List

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design