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
Back To Top
Search