0
<a href="#" class="action towishlist btn-round pink" title="Add to Wish List" aria-label="Add to Wish List" data-post="{&quot;action&quot;:&quot;https:\/\/abc.test\/en\/wishlist\/index\/add\/&quot;,&quot;data&quot;:{&quot;product&quot;:3311,&quot;uenc&quot;:&quot;aHR0cHM6Ly9nYW1lby50ZXN0L2VuL3BsYXlzdGF0aW9uLmh0bWw,&quot;}}" data-action="add-to-wishlist" role="button" date-ref="3311">
        <i class="fal fa-heart fill-linear-gradient-pink-purple-light"></i>
</a>

i want to get data from data post attribute in Jquery knock out js how i can get this ?

1 Answer 1

0

You can use something like this,

const postData = $('.action.towishlist.btn-round.pink').data('post')

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.