সম্পাদনা
<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> <style> .tomato { background: tomato; } </style> <script> $(document).ready(function(){ $("button").click(function(){ if($("div").hasClass("tomato")){ $("p").text("class exists"); } }); }); </script> </head> <body> <button>ফলাফল</button> <div class="tomato"></div> <p></p> </body> </html>
পূর্বরূপ