Quantcast
Channel: get the id value before the function by using jquery - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by punkbit for get the id value before the function by using jquery

// first, extend jquery with `validate` method$.fn.validate = function() { var isValid = this.attr('id') === 'test' return isValid}$(document).ready(function(){ if ($("#test2").validate()) {...

View Article



get the id value before the function by using jquery

$(document).ready(function(){ $("#test").validate(); function validate(){ var x= //do some code it will return #test alert(x); }});I want to the value test or #test how to get ithow can do that?

View Article
Browsing all 2 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>