make caption to link in wordpress

 

jQuery(‘.dev3-service-thumb-list .gb-grid-column .gb-inside-container .wp-block-image ‘).find(‘figcaption’).each(function() {

console.log($(this).attr(‘href’));    console.log(jQuery(this).val(‘figcaption’));

});

test2

jQuery('.dev3-service-thumb-list .gb-grid-column .gb-inside-container .wp-block-image ').find('a').each(function() {
var link = jQuery(this).attr('href');
jQuery("figcaption").append("<a href='#' class='remove-box'>Remove</a>");
});


jQuery('.dev3-service-thumb-list .gb-grid-column .gb-inside-container .wp-block-image').on('click', function() {
var _link = jQuery(this).find('a').attr('href'); console.log(_link);
window.location.href = _link;
})

Leave a Comment

Your email address will not be published. Required fields are marked *