How to optimize the judgment syntax? Look at the content ~

clipboard.png

if($(".ing>img").hasClass("show")){
                    
}else{
    $(".ing>img").addClass("show");
}
Sep.16,2021

directly $(".ing > img"). AddClass ("show"); , jq will determine whether the element className has show


jq. If you really want to optimize it, use the ternary operator < >: < >


with toggleClass, jquery1.8.3 and
seem to have been in which version.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36db4-2c03c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36db4-2c03c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?