I need you to add a throttle function to my JQuery Function
$30-250 USD
In Progress
Posted over 11 years ago
$30-250 USD
Paid on delivery
Hello,
I just need some code added to the snippet below so that the amount of times the function can be called by clicking the button is throttled.
I'm quite new to JQuery so I couldn't quite figure it out.
I'm using the JQuery plugin located here - [login to view URL]
I've also attached the plugin to this project.
Here is the code for the button and function that it calls. The function needs to be throttled:
<div><a onclick="updateme();" class="button"><span style="color:white;">Refresh</span></a></div>
<script type="text/javascript">
function updateme() {
[login to view URL]({
type: 'GET',
url: '[login to view URL]<?php echo $product['product_id']; ?>',
dataType: 'json',
success: function(data) {
if ([login to view URL]) {
$('.pns-price').fadeOut().html([login to view URL]).fadeIn();
}
}
});
}
</script>