Commit ecac6c88 by rajshah

feat: download resource count fix v1.7

parent cb2d17c5
......@@ -343,7 +343,7 @@
})(jQuery);
// download count
jQuery(document).ready(function ($) {
$("#btn-resource-download").on("click", function () {
$(".btn-resource-download").on("click", function () {
const resourceId = $(this).data("resource-id");
console.log("Resource ID:", resourceId);
......
......@@ -62,7 +62,7 @@ endif;
<p><?php echo get_the_excerpt() ?: wp_trim_words(get_the_content(), 8, ' [...]'); ?>
</p>
<a href="<?php echo esc_url($url); ?>" target="_blank"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" id="btn-resource-download" data-resource-id="<?php echo get_the_ID(); ?>"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light btn-resource-download" data-resource-id="<?php echo get_the_ID(); ?>"
download>Download
Now [<?php echo $icon; ?>]<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
......@@ -122,7 +122,7 @@ endif;
<div class="row">
<div class="col-md-6 col-lg-4 order-md-2">
<a href="<?php echo esc_url($url); ?>" target="_blank"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light" id="btn-resource-download" data-resource-id="<?php echo get_the_ID(); ?>"
class="btn btn-primary btn-padding hover-up btn-start-project font-14 fw-500 btn-padding btn-submit text-light btn-resource-download" data-resource-id="<?php echo get_the_ID(); ?>"
download>Download
Now [<?php echo $icon; ?>]</a>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment