[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Jquery question

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 6

File: question.jpg (14KB, 314x184px) Image search: [Google]
question.jpg
14KB, 314x184px
So this is a simple Jqeury function that will change the css class depending on whether you hover over or not. When you stop hovering it reverts back to the original

I'm just confused on the second half of the function. How does it know that the mouse is not hovering anymore? It's just a function below the other one, I'm confused
>>
You can clearly see there is a comma after the first function. So hover takes two arguments (2 functions). First is for when cursor is hovering above the element second function is when its not.
>>
>>61095736
Oh I get it now. Thank you!
>>
File: kot knife.jpg (73KB, 604x453px) Image search: [Google]
kot knife.jpg
73KB, 604x453px
it literally tells you in the online docs

Description:Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
>>
I'm not seeing the benefit to this over ::hover in CSS?
>>
File: 1494886572171.png (236KB, 808x805px) Image search: [Google]
1494886572171.png
236KB, 808x805px
>>61095662
FIX THAT INDENTATION OR I WILL FUCKING KILL YOU
>>
File: ok.jpg (14KB, 685x39px) Image search: [Google]
ok.jpg
14KB, 685x39px
>>61095871
>>
File: apricot.jpg (37KB, 408x495px) Image search: [Google]
apricot.jpg
37KB, 408x495px
>>61095988
>>
File: 1474583196917.jpg (71KB, 633x758px) Image search: [Google]
1474583196917.jpg
71KB, 633x758px
>>61095988
>>
>>61095662

reevaluate your bullshit website

you don't need Jquery or a fucking stupid javascript that will just cause issues. Just put the info on the page and move on with your life.
>>
>>61095662
You could probably do what you're trying to do with a CSS rule.
Thread posts: 11
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.