skip to Main Content

If textarea contains this text then run query – Jquery

This is my code: $(document).ready(function () { if ($("#write_text_id").text() === "Saurav & Kunal Are God") { $(".submit_form_field").addClass('item-3'); } }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div class="test"> <textarea id="write_text_id" class="textarea small" tabindex="105" placeholder="Write Saurav &amp; Kunal Are God" rows="4" cols="50"></textarea> <input id="submit_btn_id" class="submit_form_field" type="submit"…

VIEW QUESTION

how to make checkboxes required – Jquery

I have the following code on my page that has few checkboxes. <form> <input type="checkbox" id="CatFood" /><b>Cat Food</b><br /><br /> <input type="checkbox" id="Food1" name="test222" onclick="reported(this)" />Delicious Food<br /> <input type="checkbox" id="Food2" name="test222" onclick="reported(this)" />Healthy Food<br /><br /><br /> <button type="submit">Submit</button>…

VIEW QUESTION
Back To Top
Search