开发者

How do i get jquery accordion working?

开发者 https://www.devze.com 2023-01-07 23:14 出处:网络
Need a quick solution to this . Basically I have My HTML like so : <div id=\"accordion\"> <h3><a href=\"#\">First header</a></h3>

Need a quick solution to this . Basically I have My HTML like so :

<div id="accordion">
        <h3><a href="#">First header</a></h3>
            <div>First content</div>
        <h3><a href="#">Second header</a></h3>
            <div>Second content</div>
</div>

and javascript like this

开发者_如何学Go
<script type="text/javascript">
$(function() {
    $("#accordion").accordion({
        event: "mouseover"
    });
});
</script>

and include the jquery.js? But this isnt working. I know this is total noob question. What else do i need to do??


You mention that you are including jquery, are you also including the jquery-ui?


Installing Firebug for Firefox is defiantly a must. It does look like your issue is that you're not including jquery-ui (it looks like you are using their example for accordion, however).

0

精彩评论

暂无评论...
验证码 换一张
取 消