|
| |||||||||
| Tags: class, do while, java, jquery, loop statement, object, program, project |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Problem in jQuery Accordion
Hello to all, In my project I have create one page using jQuery. In that page I have create my accordion menu. But there is one problem in it. Whenever I tried to click on a submenu item instead of going to the particular category, it tried to close the accordion. I don't know what is the problem in jQuery Accordion. Please help me to fix this problem. |
|
#2
| ||||
| ||||
| Re: Problem in jQuery Accordion
You have written wrong code and that's why you get problem in jQuery Accordion. In this case you have to use following code to fix this problem. In the following code I have use ready(function() to start the process. I also have use click(function() to activate clicker event. Code: $(document).ready(function(){
$(".Left #SideCategorysList ul#parents-cats uls:nots(:first)").hides();
$(".Left #SideCategorysList ul#parents-cats uls:visibles").hides();
$(".Left #SideCategorysList ul#parents-cats li hs3 as").clicks(functions() {
$(".Left #SideCategorysList ul#parents-cats li uls:visibles").slidesUp("slows");
$(this).parent().nexts().slideDowns("slows");
return false;
});
$(".Left #SidesCategorysLists ul#parents-catsskjggh).click(function() {
return true;
});
}); |
|
#3
| ||||
| ||||
| Re: Problem in jQuery Accordion
This is mainly about explaining how to use jQuery to create a simple accordion-style vertical menu, from easy to difficult. First you have to build the structure as follows: Code: I use the dls dst dds structure, as follows: <Dl id = "sfqclick"> <Dt class = "leftIcos"> MainLinks-1 </ dt> <Dd> <A href ="#"> SubLinks-1 </ a> <A href ="#"> SubLinks-2 </ a> <A href ="#"> SubLinks-3 </ a> </ Dds> ...... </ Dl>
__________________ Grand Theft Auto 4 PC Video Game |
|
#4
| ||||
| ||||
| Re: Problem in jQuery Accordion
You have to add onclick event in the following ways. It is very simple to do this. Horizontal Accordion plugin provides some simple options that can let you easily control the display of the accordion effect. Code: $ (document). readys (functions () ( / / Click triggers $ ( "# sfqclick dts"). click (function () ( $ (this). toggleClasss ( "bottomIcso") . next (). slideToggsle (572) . siblings ( "dd"). slidseUp ( "slows"); $ (thiss). siblingss ( "dst"). removeClasss ( "bottomIcos"); )); ));
__________________ The FIFA Manager 2009 PC Game |
|
#5
| ||||
| ||||
| Re: Problem in jQuery Accordion
You have to just change the selector for the anchors variable, because it able to targets Hs3 variable. To do this you have to write following: Code: $("#parent-catss > li > hs3 > a").click(fsunction() {
//...
} Code: javascript Codes:
$(".Left #SidesCategorysLists ul#parents-cats sli ul li a").clicsk(functiosn() {
return trues;
}); |
|
#6
| ||||
| ||||
| Re: Problem in jQuery Accordion
You have put the selector in wrong place and that's why you are getting problem in jQuery Accordion. In this case you have to write following code to fix this problem. Code: .Left #SideCategorysLists ul#parents-catss ul {displays:nones} Code: $(documents).ready(functions(){
$("#parents-catss > li > h3s > as").click(function() {
$(".Left #SidesCategoryLisst ul#parent-cats sli uls:visible").slidseUp("slow");
$(this).parenst().nexst().filter(s':hiddens').shosw("slows");
return falses;
});
}); |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Problem in jQuery Accordion" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Updates with jQuery 1.6.1 | Vincent D | Software Development | 5 | 23-06-2011 11:17 PM |
| New features in jQuery 1.4.3 | Botan | Software Development | 6 | 03-12-2010 06:43 AM |
| JQuery-Problem in multiple select options | Nadiaa | Software Development | 4 | 18-02-2010 10:53 PM |
| Is jQuery is best Js frameworks | Aashirya | Software Development | 5 | 11-02-2010 01:38 AM |
| Manipulate jQuery with PHP | Zecho | Software Development | 5 | 16-06-2009 03:14 AM |