Jquery数据角色=";“可折叠的”;不是';不要被俘
请看这个 为什么在本例中没有捕获Jquery数据角色=“可折叠” 这就是我尝试过的: HTML: 这是我的密码Jquery数据角色=";“可折叠的”;不是';不要被俘,jquery,jquery-ui,Jquery,Jquery Ui,请看这个 为什么在本例中没有捕获Jquery数据角色=“可折叠” 这就是我尝试过的: HTML: 这是我的密码 <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <!--<script src="_assets/js/index.js"></script>--&
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!--<script src="_assets/js/index.js"></script>-->
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/additional-methods.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script src="js/custom/search.js"></script>
<script src="js/custom/url.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.my-collaspible').bind('expand', function () {
alert('Expanded');
console.log('sss');
});
$('.my-collaspible').bind('collapse', function()
{
alert('Collapsed');
});
$('.my-collaspible').bind('collapsibleexpand', function () {
alert("Expanded");
});
});
$(文档).ready(函数(){
$('.my collaspible').bind('expand',function(){
警报(“扩展”);
console.log('sss');
});
$('.my collaspible').bind('collapse',function()
{
警报(“崩溃”);
});
$('.my-collaspible').bind('collapsableexpand',function(){
警报(“扩展”);
});
});
试试这个:-
$('.my-collaspible').bind('expand', function () {
alert('Expanded');
});
$('.my-collaspible').bind('collapse', function()
{
alert('Collapsed');
});
这是一个很好的解决方案,但是如果我在我的应用程序中运行同样的程序,我不知道为什么它不起作用。谢谢你的回答,有什么原因让它在应用程序中不起作用吗??我已经在文档下准备好了它。@PreethiJain检查您的浏览器控制台是否有其他错误?是的,我已经检查过了,但在浏览器控制台下没有找到任何错误。您使用的是哪个jquery版本?
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!--<script src="_assets/js/index.js"></script>-->
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/additional-methods.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script src="js/custom/search.js"></script>
<script src="js/custom/url.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.my-collaspible').bind('expand', function () {
alert('Expanded');
console.log('sss');
});
$('.my-collaspible').bind('collapse', function()
{
alert('Collapsed');
});
$('.my-collaspible').bind('collapsibleexpand', function () {
alert("Expanded");
});
});
$('.my-collaspible').bind('expand', function () {
alert('Expanded');
});
$('.my-collaspible').bind('collapse', function()
{
alert('Collapsed');
});