【发布时间】:2013-02-12 15:19:14
【问题描述】:
我一直在尝试在数据属性被识别后访问数据和嵌套元素但我没有运气,这里是代码:
$('#item-prize-location').find('[data-region]').each(function(){
//want to access data-region value
//want to access nested divs with
});
当我执行 console.log(this) 时,它会为我提供所有嵌套元素,但我不知道如何访问它们或数据区域的值。
【问题讨论】:
-
你能具体说明你想要做什么吗?请提供您的 html 代码以及您的问题很难理解
标签: jquery css-selectors