0

filename.js

categoryClick: function(data, event) {
   var clickUrl = $(this).attr('href');
   console.log(clickUrl);
},

filename.html

<div class="bottomWrapper">
    <ul id="progressbar">
        <li class="first">
            <a data-bind="attr: { href: getBaseUrl + 'configurator/index/builtcatcollection/itemid/1'}, click: categoryClick"> Text 1 </a>

        </li>
        <li>
            <a data-bind="attr: { href: getBaseUrl + 'configurator/index/builtcatcollection/itemid/2'}, click: categoryClick"> Text 2 </a>
        </li>
    </ul>
</div>

I want get url on click anchor fucntion.

Click function is working fine but url is not getting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.