Forums

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

Home Forums JavaScript Using JQuery in Word Press

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25591

    I am using Word Presss 2.8.1 and a child theme based in Fusion 3.0.4.

    I want to use this jquery accordeon effect on my sidebar. (http://jqueryfordesigners.com/jquery-lo … van-damme/)
    But I can’t make it work on Word Press.

    I pasted the html code on sidebar.php and the corresponding css in style.css

    The header.php already includes those lines of code:

    Code:

    ‘no’) { ?>


    So, I guess I don’t need to call the jquery script

    I tried pasting the following code in different places: inside the <head></head> in the footer.php, I tried pasting it in the functions.php, and to include it in fusion.js, but nothing seem to work

    Code:

    I tried to make an external link to google in header.php

    Code:

    but nothing worked.

    I have so many things to put in the sidebar. It would be wonderful if I could make it work. :-(

    #61450
    Rob MacKay
    Participant

    yea well there could be many issues here – but some of the common ones are:

    2 types of library – you might have called in the library you are using and another that a widget or plugin is using… 2 different versions of jQuery loading can cause it to break. You could also be loading 2 different types of lib, like mootools and jQuery.

    Is there anyway we could get a live link – it would probably help more. :)

    #61472

    Hi Robskiwarrior,

    As I am using a theme that uses its own jquery + the wp included jquery, I think you are right.
    I will upload the files to a server and post a link, so you can check it out.

    Thanks, so much!

    #61524
    Rob MacKay
    Participant

    no probs – you can just pretty much take one out – if there is already a lib working, then you don’t have to worry about calling in jQuery for your functions :)

    #61545

    Hi, Robskiwarrior,

    I had a hard time yesterday migrating the site from my localhost to a server.

    OK let’s see:
    the html and css parts on the sidebar are ok

    the accordeon effect code is also ok.
    (I pasted it on a file.htm and it worked fine – it’s linked to jquery-1.3.1.min.js )

    So, I think the problem really is on the link to that file.

    On the header.php (on my child theme for the Fusion theme)
    the template code calls

    Code:
    ‘no’) { ?>


    I’ve tried:

    1- include a call to the file I need, on header.php:

    Code:

    2 – pasted after wp_head() — still in header.php

    Code:

    I also paste the same code in functions.php on the Fusion theme (to kind of register the new function

    But it still doesn’t work.

    The URL is:
    http://www.idigitais.com.br/wp

    Please, don’t give up on me. What am I doing wrong?

    Thanks, for your kind attention.

    #61549

    Hi, apostrophe

    The problem is that I want the first segmente of the sidebar to work like an accordeon. Right now, all the tabs are showing all the content. I want only on tab content to be viewable. All the code, I used is working well in an html file, the problem seems to arise in Word Press.

    Besides, I am using Fusion theme that seems to have its own jquery customized and also calls the jquery included in WP.

    So, when I want to call the js I need to make the script run, nothing happens.

    #61556

    Thanks, apostrophe, for pointing it out. There were some many errors. I just finished validating the whole site.
    The only errors I could not get rid of are injected by wp_banerize plugin . Apparently there is not an alt tag output for the pictures and some <li> tags on the sidebar (but I think they are important for the formatting of the accordeon thing I want to implement.

    Anyway, validating and correcting the errors didn’t help the jquery animation.

    Could you please check it out again?

    #61772

    Hi apostrophe,

    I am back after I eliminated ALL the errors. I received a beautiful green tab in validator! (So, proud of me and so grateful to you!).

    But, I still have three problems:

    1) the tab jquery thing. I tried including :

    Code:

    but it still didn’t work.

    Is that the right way to do it? How do I include a call to the right jquery version? I tried mimicking the original code… without success.

    2) In IE 7 and IE6 the site is are all messed up!
    In IE7 the footer is right bellow the header messing up all the content. It was ok without the footer.
    I tried the sticky footer trick (I followed Chris Coyler tutorial) and it did’t work.

    In IE6 the footer does not show and the sidebar looks awful. It is appearing bellow the page and is messed up.

    Hope you can help me. I updated everything. So you can check it at:
    http://www.idigitais.com.br/wp

    Thank you VERY much!

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