Which j query function is used to hide a div or content when not focus on the label. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Which j query function is used to hide a div or content when not focus on the label.

When we click on outside the label the box content or div should close or hide. Which function is used??

16th Aug 2022, 1:22 PM
Mehwish
Mehwish - avatar
6 Answers
+ 1
$("div").hide();
16th Aug 2022, 1:30 PM
JaScript
JaScript - avatar
+ 1
$('#label').blur(function() { $("div").hide(); }); Please show your attempt for more help.
16th Aug 2022, 2:06 PM
JaScript
JaScript - avatar
+ 1
There is also another possibility. You can try this out: https://code.sololearn.com/WlKh5fhCesLz/?ref=app
16th Aug 2022, 2:39 PM
JaScript
JaScript - avatar
0
This will hide that div but when? Jb bh label se out wo click ho to wo hide ho jaye
16th Aug 2022, 1:31 PM
Mehwish
Mehwish - avatar
0
I have tried this but it doesn't work
16th Aug 2022, 2:08 PM
Mehwish
Mehwish - avatar
0
Ok I'll try this thank you so much
16th Aug 2022, 2:58 PM
Mehwish
Mehwish - avatar