Javascript 如何在jquery中选择可编程选择的项?
请帮帮我Javascript 如何在jquery中选择可编程选择的项?,javascript,jquery,Javascript,Jquery,请帮帮我 如何在jquery中选择可编程选择的项? 我要打电话给mousedown event manullay <div id="Explorer"> <!--items--> </div> <input type="button" title="Select" click="Select()"/> <script> $("#Explorer").selectable(); function Select() { //i know
如何在jquery中选择可编程选择的项?
我要打电话给mousedown event manullay
<div id="Explorer">
<!--items-->
</div>
<input type="button" title="Select" click="Select()"/>
<script>
$("#Explorer").selectable();
function Select() {
//i know following code is incorrect
$("#Explorer").children().eq(4).select();
}
</script>
$(“#资源管理器”).selective();
函数Select(){
//我知道下面的代码不正确
$(“#资源管理器”).children().eq(4).select();
}
您的代码中有几个错误:
1-使用select()
是错误的
2-不要使用select
name重新声明函数
$(函数(){
$(“#资源管理器”).selective();
});
函数my_select(){
$(“#资源管理器”).find(“.item”).eq(4).addClass('ui-selected');
}
#Explorer.ui选择{
背景#FECA40;
}
#已选择Explorer.ui{
背景:#F39814;
颜色:白色;
}
#探险家{
列表样式类型:无;
保证金:0;
填充:0;
宽度:60%;
}
#探险家p{
保证金:3倍;
填充:0.4em;
字号:1.4em;
高度:18px;
}
第1项
第2项
第3项
第4项
第5项
第6项
第7项
不,这是不同的问题有什么不同?请解释清楚,也许我们能帮上忙。如果你能看到任何有助于你实现目标的方法,你是否检查过这个问题?我想调用mousedown事件manuallay