Topic: Adding a jquery element?

I'm trying to use what looks to be a really cool jquery element. Here it is:

http://medienfreunde.com/lab/innerfade/

Only problem is, I have no idea how to get it on my homepage.

Please tell me how to get this on my child theme homepage and be as explicit as possible, I need step by step instructions. Don't assume I know how to do anything.

Remember doing proofs in High School math? That's basically what I need. Walk me through exactly where I need to put what code to get this thing working.

Anyone's help is GRRRRRRRRREATLY appreciated!

2 (edited by elitewildlifesolutions 09-05-2012 UTC 08:29:34)

Re: Adding a jquery element?

Here's what I've done so far:

I've added the .js files to the js folder. Then, I added the js script and ul to my home.php file. No idea why it's not working!

All I want is a clean, simple scrolling text list on my homepage!

If you look here:

http://elitewildlife.com/

I just want testimonials below the video. That would look awesome and I could really use someone's help.

Re: Adding a jquery element?

What about using a plugin?
http://themeid.com/forum/topic/1037/rep … slideshow/

Ulrich

4 (edited by elitewildlifesolutions 09-06-2012 UTC 08:56:41)

Re: Adding a jquery element?

grappler wrote:

What about using a plugin?
http://themeid.com/forum/topic/1037/rep … slideshow/

Ulrich

I've nearly torn my hair out trying to make every plugin meet my needs by trying to retro-fit it etc.

All I want is this super clean little script jacked right into the code. Can anybody help me? I know it's just a matter of putting the right stuff int he right place to make the call work etc.

Plus, this script is actually really sweet. You might want to check it out. It can be a news ticker, random quote/testimonial display, or picture slider! I would imagine it could do videos to. It will do ANY content inside the wrapper. That's what I'm talking about!

Re: Adding a jquery element?

What do you want to use it for?

Ulrich

Re: Adding a jquery element?

I want to use it for a testimonial scroll, sans the bloated nature of a plugin. I love how clean and elegant it is.

The other reason I like it is I can easily put a box around the quote with a background gradient via CSS instead of a picture like .png or .jpg that a lot of plugins use.

All I need to know is where to put what.

Re: Adding a jquery element?

This is what I would do:

- Create a functions.php within your Child Theme.
- Open the functions.php and paste this in:

<?php
    /**
     * A safe way of adding javascripts to a WordPress generated page.
     */
    if (!is_admin())
        add_action('wp_enqueue_scripts', 'responsive_child_js');

    if (!function_exists('responsive_child_js')) {

        function responsive_child_js () {
            // JavaScript at the bottom for fast page loading.
            wp_enqueue_script('custom-scripts', get_stylesheet_directory_uri() . '/js/custom-scripts.js', array('jquery'), '1.0.0', true);
            wp_enqueue_script('custom-plugins', get_stylesheet_directory_uri() . '/js/custom-plugins.js', array('jquery'), '1.0.0', true);
        }

    }
?>

- Save functions.php with newly pasted function.
- Create a folder within your Child Theme and name it /js/ which would look something like this: /responsive-child-theme/js/
- Create custom-scripts.js and custom-plugins.js and include that in your /js/
- Add your JS in scripts and if there's a snippet from any of them, just pop that in plugins.
- Last step is to upload this to your server and you're done.

I know that this looks pretty big, but it just looks that way that's all.

And just because we're awesome, here's all this done for you in Child Theme form: http://themeid.com/public/responsive-with-js.zip

Enjoy!

Emil


elitewildlifesolutions wrote:

I want to use it for a testimonial scroll, sans the bloated nature of a plugin. I love how clean and elegant it is.

The other reason I like it is I can easily put a box around the quote with a background gradient via CSS instead of a picture like .png or .jpg that a lot of plugins use.

All I need to know is where to put what.