使用jquery插入手风琴单击函数时切换代码不起作用 [英] toggle code not working when inserted in accordion click function using jquery

查看:89
本文介绍了使用jquery插入手风琴单击函数时切换代码不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我上一个问题的后续问题使用jquery的手风琴内切换按钮

a>虽然我的问题得到了答复(我已修复我的代码以反映相同的情况),但代码仍然无法正常工作。



我正在动态获取内容在使用ajax调用的手风琴中。我试图把代码放在手风琴点击功能中。但我无法切换内容。当我打开手风琴选项时,我仍然可以看到内容。任何建议什么是错误的?

我检查了萤火虫,当我点击手风琴它确实去隐藏段。当我点击隐藏按钮时,它会执行切换语句。但我仍然可以看到内容。 (这应该是隐藏的)。

解决方案

感谢所有的评论。我想到了。这是我的拼写错误,我没有声明类测试为div,一旦修复它的工作。


This is followup question from my previous question "Toggle button inside accordion using jquery" Although did got reply for my question (I have fixed my code to reflect the same) but still the code is not working.

I am getting the contents dynamically in the accordion using ajax call. I tried to put the code inside the accordion click function. But I am not able to toggle the contents. When I open the accordion options I can still see the contents. Any suggestions what is going wrong?

I did checked on firebug and when I click on accordion it does goes to hide segment. While I click on the hide button it does execute the toggle statement. But I can still see the contents. (Which were supposed to be hidden).

解决方案

Thanks all for comments. I figured it out. This was my typo mistake I did not declared class test as div once fixed its working.

这篇关于使用jquery插入手风琴单击函数时切换代码不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆