Javascript 使用xoxco在搜索框焦点上的下拉div
我正在使用Xoxco的插件进行标记输入,可在此处找到: 在我的修改中,我使用了JQuery的Javascript 使用xoxco在搜索框焦点上的下拉div,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我正在使用Xoxco的插件进行标记输入,可在此处找到: 在我的修改中,我使用了JQuery的focus()函数 <input id="tags_1" class="tag-holder" type="text" class="tags" /></p> <div id="std" style="display:none;"> <span id='pdf' onmouseover="" style="cursor: p
focus()
函数
<input id="tags_1" class="tag-holder" type="text" class="tags" /></p>
<div id="std" style="display:none;">
<span id='pdf' onmouseover="" style="cursor: pointer;">PDF</span>
<p id="reset" onmouseover="" style="cursor: pointer;">Reset Tags</p>
</div>
然而,当我修改插件时,这似乎不起作用。它在不使用插件的情况下单独工作。我有什么遗漏吗 因为问题是,它在元素id中添加了一个
\u标记,而该id不再可用,所以您必须将此id\tag\u标记
:
因此,您的代码应该如下所示:
秩序问题
$('#tags_1').tagsInput({width:'auto'})// 因为问题是它在元素id中添加了一个\u标签
,而该id不再可用,所以您必须将此id\tag\u标签
:
因此,您的代码应该如下所示:
秩序问题
$('#tags_1').tagsInput({width:'auto'})// 因为问题是它在元素id中添加了一个\u标签
,而该id不再可用,所以您必须将此id\tag\u标签
:
因此,您的代码应该如下所示:
秩序问题
$('#tags_1').tagsInput({width:'auto'})// 因为问题是它在元素id中添加了一个\u标签
,而该id不再可用,所以您必须将此id\tag\u标签
:
因此,您的代码应该如下所示:
秩序问题
$('#tags_1').tagsInput({width:'auto'})//但它在这里起作用:尝试事件。例如:$('#tags_1').on('focus',function(){$('#std').css('display','block');})代码>$('#std').show()
也可以这样做。@Era,就像我在OP中提到的,它是单独工作的,但是当我将它与xoxco插件集成时,它就坏了。但是它在这里工作:在
事件上尝试。例如:$('#tags_1').on('focus',function(){$('#std').css('display','block');})代码>$('#std').show()
也可以这样做。@Era,就像我在OP中提到的,它是单独工作的,但是当我将它与xoxco插件集成时,它就坏了。但是它在这里工作:在
事件上尝试。例如:$('#tags_1').on('focus',function(){$('#std').css('display','block');})代码>$('#std').show()
也可以这样做。@Era,就像我在OP中提到的,它是单独工作的,但是当我将它与xoxco插件集成时,它就坏了。但是它在这里工作:在
事件上尝试。例如:$('#tags_1').on('focus',function(){$('#std').css('display','block');})代码>$('#std').show()
也可以这样做。@Era,就像我在OP中提到的,它是单独工作的,但是当我将它与xoxco插件集成时,它就坏了。
$('#tags_1').focus(function(){
$('#std').css('display','block');
});
$('#tags_1').tagsInput({width: 'auto'}); //<----tagInput applied
$('#tags_1_tag').focus(function(){ //<-----this id has to be the target now
$('#std').css('display','block');
});
$('[id^="tags_1"]').focus(function(){ //<-----this id has to be the target now
$('#std').css('display','block');
});