I want to know if the textarea value contains a certain word. This is not working for me.
var value = $('#embedModal textarea').val();
if($(value).contains('iframe')){...
I want to know if the textarea value contains a certain word. This is not working for me.
var value = $('#embedModal textarea').val();
if($(value).contains('iframe')){...
Try javascript
JQuery contains is for DOM elements, not strings.
Try following code.....
code:
You can do this as well:
this works:
Try doing it like this:
edit
Example