Sometimes we need to format the content differently according to the screen resolution of the user. One of the ways to do this is to simply detect the screen width using the screen.width property and change the stylesheet. In this tutorial we’re going to see how to do that using jQuery.
One user asked the other day on the jQuery Tabs tutorial how to highlight the particular tab we selected. In this tutorial we will see some way to select different elements using jQuery, from a basic multiple selection, a multiple selection revealing content and a excluding selection revealing content. See the three examples and read on.
In this tutorial we will be learning how to create a collapsible panel or sidebar and an expandable content area. jQuery will be assisting us to create this smooth and sleek behaviour. Once our panel is hidden, we will display a small button to reveal it again.
First, you might want to see the Collapsible Panel demo. Then proceed to the tutorial. Read more
This new search engine named itpints claims to be a real-time search engine. It seems to accomplish this by searching through all the blogs, news, social bookmarks and networks, video and images. I have coded a Ubiquity command to receive instant results through it. Read more
The other day I needed to create a block (or widget) with tabs, so I started checking different jQuery based tab solutions but they were all very large for what I needed. Most of the jQuery based tabs I found had a lot of functionalities to fulfill everything you need, but they end up being quite large, bloated and complex. I wrote this small jQuery dependant code to create my own tabs widget and thought you could find it useful. Read more
Let’s talk about a simple technique to create folding or collapsible menus for the WordPress Pages widget. A while ago I was doing some coding for a IT Solutions site and they had a large ‘Services’ page with an introduction and 6 sections. They needed a parent page for the intro and 6 child pages and they didn’t wanted to show all the pages and subpages at once. I thought this would be an excellent job for jQuery and a collapsible or folding menu.
We’ll be creating here a folding menu using only jQuery, no CSS no special markup, and enqueueing the script with the recommended technique for WordPress. Keep reading to see the solution…
What’s you IDE of choice when it comes to web development? I use Aptana Studio which absolutely rocks when it comes to web development. By default, Aptana doesn’t have a PHP editor but you can install it after you install the default Aptana installation from the Aptana\My Aptana menu option. A page will open with some plugins you can add to Aptana and this is where you will find PHP support.
So, what about WordPress? does Aptana supports WordPress? well, Aptana has HTML, CSS, PHP autocompletion and it also support libraries like jQuery. To enable jQuery autocompletion open the References panel and under the Global References section check (if it’s not checked already) the jQuery 1.2 or 1.3 support; you will instantly get jQuery autocompletion. However, WordPress autocompletion is not yet supported so I’ve been writing a bunch of what Aptana calls Code Templates to assist me while coding a WordPress theme or plugin. It’s no rocket science, all you have to do is (having Aptana PHP installed of course, since WP is written on PHP) go to Window\Preferences. Then, on the tree, go to Aptana-Editors-PHP-Code Templates
Like I said, I’ve started writing some templates, so you can download these WordPress code templates for Aptana 1.2 and import them to the Code Templates. The Code Templates are variable based so, for example, you can write (see the image above) the hook name to add an action to, and it will append the hook name to whatever function name you add (it’s the way I write action and filter functions). I’ve included the WordPress loop by Justin Tadlock, explained in great detail on its website, as an example of a large code template, and you can trigger it typing the_loop on the Aptana PHP editor. Other code templates like the ones triggered by _openfile and _savefile (for opening and saving a file in a WordPress option page) make heavy use of variables.
I wonder why there’s still no IDE that supports WordPress syntax, given that it has become so widely spread on the last two years. We can only expect that 2009 will be the year where an IDE add WordPress syntax. Maybe Aptana is the one, it has been growing amazingly in the last year and I hope it will continue doing it.
I wonder, do you know of any IDE supporting WordPress? which is your IDE of choice? I will be adding more WordPress Code Templates for Aptana so stay tuned!
Ever wanted to get some colors to match that brilliant green from your client’s logo? Picking up the right color is not an easy task. Thankfully, there are some online tools that can be helpful when looking for the right color. These 7 tools will help you to get the right color. Each of these tools was picked based on its usefulness, features and fast responsiveness to ensure a proper workflow. Read more