Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript need help getting Anythingslider running!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35415
    mrtphotog
    Participant

    I’m installing Anythingslider into my WordPress theme. Not the plugin.. I need it to work with normal posts of a catagory(add to slider) on the front page. I made my own custom loop for it. I can get the posts to show up with what I think is the correct structure and id’s.. but all I’m getting is HTML… no slider! I’m including the output of the page. It’s getting the javascript in the page.. please let me know what I missed or what else I need to show. If you need to see the page, give me your IP address and I’ll add you to the whitelist to get past the ‘under construction page’. I’m working locally on wamp server.. but I have a hosted version as well with the same result.

    From head:




    TBS Tow World | Custom Wreckers & Car Carriers































    From body:






    • test truck post 1


      show_image3

      truck 1


      in cat ‘new trucks’ and ‘add to slider’


      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pellentesque ipsum non felis vestibulum vel rhoncus augue cursus.







    • Hello world!





      Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!







    #91667
    Mottie
    Member

    Hi Mrtphotog!

    I don’t see a script tag that is loading jQuery itself. When you do add it, I recommend using the latest version (currently 1.7.1).

    #91668
    mrtphotog
    Participant

    Yeah.. that was it. I wasn’t looking hard enough. I was anticipating that WordPress was loading jquery already. I found the right chunk of code in the WordPress Codex:

    function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');
    wp_enqueue_script( 'jquery' );
    }

    add_action('wp_enqueue_scripts', 'my_scripts_method');

    That got it running. I’ll mess with the settings and update the function for a more up to date version of jquery. Once I have everything functioning.. I’ll write a how-to. I can’t be the only one that needs Jquery in WordPress for regular posts.
    Thanks Mottie!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.