开发者

Enable right click (open new window) in the suggestions menu in jqueryui autocomplete

I have a jqueryui autocomplete widget in which the listings in the suggestions menu are clickable links.

Now, left clicking on the links works fine, but the browser (I'm using chrome but this issue is probably not browser-specific) is not providing an option to right click the link to open a new window.

My question is how would I go about to enable the links in the suggestions menu right clickable?

In the jqueryui autocomplete code within the _renderItem() method, it has

_renderItem = function( ul, item ){ ... .append( "<a&g开发者_如何学Got;" + item.label + "</a>"

Maybe the reason that right click is deactivated is because the <a> tag does not have a href attribute? I don't really have the ability to add a href attribute with the actual url as I have a select event handler that dynamically generates the url based on other logic. Also, when I tried to add a href attribute to the <a> tag, jqueryui seems to be auto-removing it when the suggestions menu is populated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜