$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Using jquery and javascript in Wordpress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Using jquery and javascript in Wordpress

matteradmin8PV0评论

After trying for many many days without any improvement, I think I have no other choice but to ask for your help. I have to admit that I don't know much about coding, but I've tried various tutorials, but just can't get to work what I want.

The problem is that I want sidebar tabs using jquery tools as well as creating my own slider (no image slider, but a content slider). Although I did just as the tutorials say, the text just is displayed normally. No effect, no slide, no tabs, nothing.

I uploaded the .js files, put the "script" info into the header.php, used the specific style.css, also put that into the header.php and then I tried to put some "divs" to create some content. For the tabs I used this tutorial. It's in German, but you can clearly see the steps where it tells you what to paste where. Is there anything missing? I put the "divs" into my home.php. Was that the mistake?

Do I have to put anything in my function.php as well?

I'm missing something, I'm sure of it, but I don't know what it is. I really hope that somebody can help me out here and give me a short "step-by-step" instruction or something.

My website for reference.

Sorry for asking a stupid question, but I can't seem to sovle this by myself.

Thanks a lot :)

After trying for many many days without any improvement, I think I have no other choice but to ask for your help. I have to admit that I don't know much about coding, but I've tried various tutorials, but just can't get to work what I want.

The problem is that I want sidebar tabs using jquery tools as well as creating my own slider (no image slider, but a content slider). Although I did just as the tutorials say, the text just is displayed normally. No effect, no slide, no tabs, nothing.

I uploaded the .js files, put the "script" info into the header.php, used the specific style.css, also put that into the header.php and then I tried to put some "divs" to create some content. For the tabs I used this tutorial. It's in German, but you can clearly see the steps where it tells you what to paste where. Is there anything missing? I put the "divs" into my home.php. Was that the mistake?

Do I have to put anything in my function.php as well?

I'm missing something, I'm sure of it, but I don't know what it is. I really hope that somebody can help me out here and give me a short "step-by-step" instruction or something.

My website for reference.

Sorry for asking a stupid question, but I can't seem to sovle this by myself.

Thanks a lot :)

Share Improve this question edited Sep 1, 2011 at 6:02 japanworm asked Sep 1, 2011 at 5:37 japanwormjapanworm 5873 gold badges19 silver badges40 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 2

Well first off you have way to many duplicate js files, I see at a glance 3 calls to the same jQuery in 3 separate urls, there are also other duplications (easing) and probably more that I missed, clean this up.

Secondly your not using jQuery tools properly, the javascript calls for a tab and a panel.

So remove your CSS id's from your content where you have them as tabs-1, tabs-2 , tabs-3.

Just leave it empty and wrap that whole area in a "panel" div. It should look like this, ( you don't really have to but it's best to keep it simple and get it working first.

       <ul class="tabs">
            <li><a href="#">Nunc tincidunt</a></li>
            <li><a href="#">Proin dolor</a></li>
            <li><a href="#">Aenean lacinia</a></li>
        </ul>

<div class="panes">

<div><p>Proin elit arcu, rutrum ......etc...</p></div>

<div><p>Morbi tincidunt........etc...</p></div>

<div><p>Mauris eleifend est et ......etc...</p></div>

</div>

Change your jQuery function too:

$("ul.tabs").tabs("div.panes > div");

The first part .tabs are you actual li tabs which are are in <ul class="tabs"> and the second part .panes are the panels which are wrapped in <div class="panes">

PS. I forgot to add , none of this will work without the proper CSS, You can use this or incorporate it into your theme stylesheet for my example and it should work fine http://flowplayer/css/tabs.css

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far