[index] less jquery
This commit is contained in:
parent
b456b86ca0
commit
61c52c2237
1 changed files with 4 additions and 4 deletions
|
@ -29,11 +29,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
* This allows us to cache the same thumb for all query
|
* This allows us to cache the same thumb for all query
|
||||||
* strings, adding the query in the browser.
|
* strings, adding the query in the browser.
|
||||||
*/
|
*/
|
||||||
$(".shm-image-list").each(function(idx, elm) {
|
document.querySelectorAll(".shm-image-list").forEach(function(list) {
|
||||||
var query = $(this).data("query");
|
var query = list.getAttribute("data-query");
|
||||||
if(query) {
|
if(query) {
|
||||||
$(this).find(".shm-thumb-link").each(function(idx2, elm2) {
|
list.querySelectorAll(".shm-thumb-link").forEach(function(thumb) {
|
||||||
$(this).attr("href", $(this).attr("href") + query);
|
thumb.setAttribute("href", thumb.getAttribute("href") + query);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue