Tag: 手风琴

单击即可使JQuery水平手风琴关闭

示例: http : //vincent-massaro.com/map/ 目前,该脚本允许您单击手风琴的一部分以打开它,但它设置为在mouseleave上关闭。 当我将mouseleave设置为.click时,它会感到困惑,并且不知道它处于什么状态。我想让它可以点击打开它,然后单击关闭它,而不是mouseleave。 控制它的代码如下,完整脚本位于页面源中链接的haccordion.js中。 如果有人可以帮我修改这个脚本,我将非常感激! 提前致谢。 $target.click(function(){ haccordion.expandli(config.accordionid, this) config.$lastexpanded=$(this) }) if (config.collapsecurrent){ //if previous content should be contracted when expanding current $target.mouseleave(function(){ $(this).stop().animate({width:config.paneldimensions.peekw}, config.speed) }) }

如何纠正页脚重叠的手风琴

我是jQuery的新手。 我正在使用手风琴。 当我点击手风琴时,它会重叠在页脚上。 我怎么能避免它 以下是页脚的代码 – Copyright © 2013 Powered by Test 下面是手风琴如何与页脚重叠的图片。 我不希望它与页脚重叠,但是当可折叠菜单打开时,页脚应该向下移动到手风琴下方。 下面是页脚的CSS – .row_color{ border:2px solid #A40F17; margin:0px; } .footer_class{ background-color:#A40F17; height:40px; color:#fff; font-family: “Helvetica Neue”,Helvetica,Arial,sans-serif; position : relative; } 但页脚仍然与手风琴重叠

手风琴Sharepoint 2010内容查询

我现在正在尝试为内容查询webpart实现accordion函数。 基本上,内容查询结构如下所示:标题内容我想展开崩溃 Title Content I want to expand collapse Title Content I want to expand collapse Title Content I want to expand collapse 我有3-5个。 我现在要做的是每当我点击相应的链接项(标题)div时展开描述div。 这是我的JS代码: $(document).ready(function () { //ACCORDION BUTTON ACTION $(‘#MSOZoneCell_WebPartWPQ3 .link-item’).click(function () { //MAKE THE ACCORDION CLOSE ON THE SECOND CLICK if ($(‘#MSOZoneCell_WebPartWPQ3 .description’).hasClass(‘openDiv’)) { $(‘#MSOZoneCell_WebPartWPQ3 .description’).toggle(‘normal’); $(this).next().removeClass(‘openDiv’); } else { $(‘#MSOZoneCell_WebPartWPQ3 […]

如何从不同的页面链接到特定的手风琴部分?

我已经使用Soh Tanaka的Simple Accordion教程成功构建了一个JQuery手风琴。 我希望能够从另一页链接到特定的手风琴部分,但我不知道该怎么做。 任何帮助将不胜感激,因为我没有太多运气找到任何特定于本教程的帮助。 谢谢! HTML: Web Design & Development JQuery的: //Set default open/close settings $(‘.acc_container’).hide(); //Hide/close all containers $(‘.acc_trigger:first’).addClass(‘active’).next().show(); //Add “active” class to first trigger, then show/open the immediate next container //On Click $(‘.acc_trigger’).click(function(){ if( $(this).next().is(‘:hidden’) ) { //If immediate next container is closed… $(‘.acc_trigger’).removeClass(‘active’).next().slideUp(); //Remove all “active” state and slide up the […]

单击后设置“激活”手风琴菜单

我点击链接后尝试将手风琴菜单设置为“活动”并更改页面… HOME QUEM SOMOS EMPRESA INSTITUCIONAL NOSSOS PRODUTOS RESPONSABILIDADE SOCIAL RESPONSABILIDADE AMBIENTAL PRODUTOS <a href="https://stackoverflow.com/questions/16325178/set-active-accordion-menu-after-click/produtos_categoria.asp?categoria=”> INFORMATIVO CONTATO jQuery的: $(document).ready(function(){ $(‘dd’).hide(); $(‘dt a.submenu’).click(function(){ $(“dd:visible”).slideUp(“slow”); $(this).parent().next().slideDown(“slow”); return false; }); }); 我也在尝试,请使用此https://stackoverflow.com/questions/10681033/accordion-menu-active-state-after-link-click但不行… 我尝试了什么(但不工作): $(document).ready(function(){ $(‘dd’).hide(); var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf(‘/’) + 1); $(“dt a.submenu[href='” + sPage + “‘]”).parents(“dd:visible”).show(); $(‘dt a.submenu’).click(function(){ $(“dd:visible”).slideUp(“slow”); var checkElement = $(this).next(); […]

Jquery Accordion没有在ajax调用上触发

我将源代码从输出页面复制到下面的文件中,这样你就可以看到我在说什么: http://playerspace.com/mysource.html 我们正在关注的是最近的活动ajax(由于某种原因,它不适用于此输出版本)。 我希望只看代码就足以诊断它了。 无论如何,问题是“评论”链接,这是一种手风琴,揭示了一个不断扩大的文本区域。 在时间轴中接下来的5个项目的ajax加载之后,评论链接(部分或全部)完全停止响应。 我尝试将手风琴代码直接添加到ajax调用中,但仍然无法一致地执行。 $(document).on(“click”,’.siteusemore’,function() { var ID = $(this).attr(“id”); var myscript = window.siteusemore_script || null; if(ID) { $(“#siteusemore”+ID).html(”); $.ajax({ type: “POST”, url: myscript, data: “lastmsg=”+ ID, cache: false, success: function(html){ $(“ol#siteuseupdates”).append(html); $(“#siteusemore”+ID).remove(); $(‘.accordionContent,.accordionContent-settings’).hide(); $(‘.accordionContent,.accordionContent-manuallyadd’).hide(); $(‘.accordion-comments’).live(“click”,function(event){ var target=$(this).attr(‘href’); if($(target).css(‘display’)==’none’) { $(target).show(); $(this).text(‘Hide Comments’); } else { $(target).hide(); $(this).text(‘Comments’); } return false; }); […]

在标题上获取Div ID单击,Accordion

我正在使用Jquery手风琴来填充dynatree。 我需要我的手风琴div来填充点击标题,这就是为什么我试图抓住div id。 这个Jquery可以工作,但只有当我点击扩展的div而不是标题时。 这是有道理的,因为我的活动是.common click。 $(“.common”).click(function () { var currentID = $(this).attr(“id”); alert(currentID); }); Project Type Ammenities 我需要弄清楚如何在标题点击上获得div id。 Accordion不能很好地播放,所以如果我将我的id和类切换到标题上,事件就不会触发。 我尝试过使用$(“#accordion .common”).click这个也不行

jQuery手风琴 – 链接打开某些div

我正在做一个噩梦试图让这个工作(并查看其他post,但我仍然有问题)。 基本上我有这样的链接: /test.php#bob 在test.php我有这个: Customer care xxxxxxxxxxxxx Strong leadership from start to finish fffffffffff Certainty of delivery, no matter how complex or difficult dddddddddd 在jQuery我有这个: $(“.accordion”).accordion({ autoHeight: false, collapsible: true, navigation: true, active: ‘none’ }); 但我仍然无法通过链接打开#bob面板。 有任何想法吗? 我把头发拉了出来。 一个。

如何在jQuery手风琴的标题中切换文本?

我希望我的jQuery手风琴的标题中的文字在“编辑”和“关闭”之间切换 – 我可以在切换单个面板打开和关闭时使其工作,但是如果我打开面板并单击其他面板,上一个面板关闭但文本仍然显示“关闭”。 我还在学习jQuery和JavaScript。 我已经试了几个小时,但似乎无法找到解决方案。 任何建议都将非常感谢! 这个jQuery允许我在一个面板上成功切换文本: $(function(){ $(“.details-toggle”).click(function () { $(this).find(“.edit-toggle”).text(function(i, text){ return text === “edit” ? “close” : “edit”; }) }); JSFIDDLE演示: http : //jsfiddle.net/dylanstewart/nvhsyx6n/

如何在单击其他项目时从先前的选择中删除类?

http://jsfiddle.net/freqn/ZHt6V/2/ 如果在此手风琴中单击其他项目,如何从之前的选择中删除课程? 我希望在展开下一个项目时从上一个单击的项目中删除该类。 选择新项目后,所有其他项目应重新变为灰色。 谢谢。 (function () { $(‘dd’).hide(); $(‘dt’).click(function(){ $(this) .next() .slideToggle(200) .siblings(‘dd’) .slideUp(200); }); $(‘dt’).click(function(){ $(this).toggleClass(‘active’); }); })();