Sometimes, you have a many tag with same class and attribute with value, but you need to find maximal value of attribute from that comman class, In bellow you have same html tag:
<li class="test" data-id="3">hi</li>
<li class="test" data-id="5">hey</li>
<li class="test" data-id="1">hello</li>
Now, you require to get max value, i mean you need to 5, because that is big value from other, so you can get maximal value from this way:
var max = 0;
var value = parseInt($(this).data('id'));
max = (value > max) ? value : max;
- Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin
- Laravel 5 Ajax CRUD with Pagination example and demo from scratch
- How to send mail using Sendgrid in laravel 5?
- PHP - multiple file uploading dropzone js example
- How to get current controller name in view Laravel 5?
- Laravel 5.2 API using JWT authentication tutorial from scratch example
- Laravel 5 Pagination example
- Laravel 5.3 - Form Input Validation rules example with demo