最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jquery attribute selector problem: Dynamic attribute selector - Stack Overflow

programmeradmin2浏览0评论

My code is here

$("a[href=$.jqURL.url()]").hide();

$.jqURL.url() return current page url.

But this code don't work

Is it possible to select dynamically?

My code is here

$("a[href=$.jqURL.url()]").hide();

$.jqURL.url() return current page url.

But this code don't work

Is it possible to select dynamically?

Share Improve this question asked Oct 16, 2009 at 14:04 ebattulgaebattulga 11k20 gold badges81 silver badges119 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11

You need to build the selector as a string:

$("a[href=" + $.jqURL.url() + "]").hide();
发布评论

评论列表(0)

  1. 暂无评论