Add a jQuery Function to Show or Hide the Welcome Message


show more Adding a jQuery function to show or hide the welcome message provides you with in-depth training on Web. Taught by Morten Rand-Hendriksen as part of the WordPress 3: Building Child Themes show less
please wait ...

Adding a jQuery function to show or hide the welcome message

When you add nonessential content like a welcome message to a page on your site, it's always a good idea to give people an easy way of hiding that content. This is the type of behavior that JavaScript is great for. JavaScript allows you to add the user interaction on top of existing content so that your user can interact with the content and change it even after the page is being loaded in the browser. Now though we've added welcome message and an image here at the top of the page and it looks the way we want it to, I want to add an extra feature.

A little button down here somewhere, you can click on the button and this content is hidden and then you click on the button again and it shows the content again. To make that work I am going to use some jQuery Scripts, but before I can add the script I need to add the button. In my child theme I'll open welcome.php, scroll all the way to the bottom, and here I'm simply going to add a regular button. I'll wrap it in a div with a class, c...

Adding a jQuery function to show or hide the welcome message
Video duration: 6m 34s 3h 11m Intermediate Updated Nov 27, 2012

Viewers:

Adding a jQuery function to show or hide the welcome message provides you with in-depth training on Web. Taught by Morten Rand-Hendriksen as part of the WordPress 3: Building Child Themes

Subject:
Web
Software:
WordPress
Author:
please wait ...