Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7571481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:41:07+00:00 2026-05-30T15:41:07+00:00

I’m having a problem with a javascript that I want to include in a

  • 0

I’m having a problem with a javascript that I want to include in a wordpress template page.

What I’m trying to do:
On this page – http://www.pcworld.ro/vworker/ – I want to call a javascript that will fade-in/out 6 images (you can see the first image in the top right side of the header).

This is the script: http://www.pcworld.ro/vworker/wp-content/themes/visualtime/js/innerfade.js

This is what I have in header.php:

<?php wp_enqueue_script('innerfade', '/vworker/wp-content/themes/visualtime/js/innerfade.js', array('jquery'));?>
<?php wp_head();?>
<script type="text/javascript">
$(document).ready(
function(){
$('ul#screenshots').innerfade({
speed: 1000,
timeout: 4000,
type: 'random',
containerheight: '259px'
});
});
</script> 

This is what I have in functions.php:

<?php
function load_scripts() {
   wp_enqueue_script('jquery');
   wp_enqueue_script('innerfade', '/wp-content/themes/visualtime/js/innerfade.js', array('jquery'));
}    
add_action('init', 'load_scripts');
?>

And this is the code that should be responsible for the javascript in homepage.php (the wordpress template page where I need the javascript to work):

<div id="screenshot" style="overflow:hidden;">
            <ul class="innerfade" id="screenshots" style="list-style: none outside none; margin: 0pt; padding: 0pt; cursor: pointer; position: relative; height: 259px;" onclick="location.href='#'"> 
                <li style="z-index: 6; position: absolute; display: none;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot1.jpg" alt="Room Booking System">
                </li>
                <li style="z-index: 5; position: absolute; display: none;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot2.jpg" alt="Complete Administration Panel">
                </li>
                <li style="z-index: 4; position: absolute; display: none;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot3.jpg" alt="Meeting Room Bookings">
                </li>
                <li style="z-index: 3; position: absolute; display: none;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot4.jpg" alt="View Statistics of All Room Bookings">
                </li>
                <li style="z-index: 2; position: absolute; display: none;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot5.jpg" alt="Including a Helpdesk System">
                </li>
                <li style="z-index: 1; position: absolute; display: list-item;">
                    <img src="/vworker/wp-content/themes/visualtime/images/productscreenshot6.jpg" alt="Intelligent Recurring Bookings">
                </li>
            </ul>
</div>

I’m a beginner when it comes to wordpress and an absolute noob when there’s javascript involved. Could you please explain me what I’m doing wrong and to fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:41:08+00:00Added an answer on May 30, 2026 at 3:41 pm

    This is common among wordpress theme developers, they automatically include jQuery.noConflict() in jquery file to avoid collision with other libraries.
    http://docs.jquery.com/Using_jQuery_with_Other_Libraries

    Several choices:

    Remove jQuery.noConflict(); from bottom of the jquery file
    -or-
    Replace $ in all your code with the text jQuery. The plugin files you use should be insulated and are OK

    -or-

    Change

    $(document).ready(
    function(){ 
       //.........
    }
    

    to

    jQuery(document).ready(
    function($){
       //.........
    }
    

    WIth $ as argument in ready you can use $ inside it

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
I am trying to render a haml file in a javascript response like so:
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.