I have 10 images with a data-link attribute and want to get the current page path and select the one which matches
var pathname = window.location.pathname;
current = $(".slide img").data('link', pathname);
This is what I have so far, but it returns no results.
以上就是Jquery selecting via data link的详细内容，更多请关注web前端其它相关文章！