Skip to content

Tag: jquery

Calling a method from an event handler

I have this code I am working on but every time I call init method I keep getting an error: this.addElement is not a function Is it because I can’t call methods from event handlers? Answer You should read this book, JavaScript: the Good Parts and visit the Crockenator’s web site here, crockford.co…

jQuery Youtube URL Validation with regex

I know there is plenty of question answered over here https://stackoverflow.com/questions/tagged/youtube+regex, but not able find a question similar to me. Any body has the JavaScript Regular expression for validating the YouTube VIDEO URL’s line below listed. Just want to know where such a URL can be p…

jQuery find not working

This is my HTML: And javascript: Doesn’t seem to do anything (read_more is set to display: none) any ideas? Answer Try this: $(document).ready(function(){ $(‘a.more’).click(function(){ $(this).parent().next().find(‘.read_more’).slideDown(); return false; }); }); Update: Here is t…