Skip to main content

OnMouseOver for the DIV tag

I've been working on a project that involves menu items (links to applications and reports) in our intranet portal.  These items are separated into categories/folders.

So I've been working on changing the functionality of our menu system that allows you to pin and unpin the menu items to a Favorites section.  The Favorites section is up top and you can have a max of 10 favorites. 

Yesterday I ran into an issue that didn't make sense.  Within a DIV tag I had 2 other DIVs, one DIV displayed the menu link, and the other for the image of the pin.  I used the OnMouseOver event for the main DIV to show the pin next to the menu link, but it would only show when the mouse was over the link (not over blank parts of the main DIV).

I put a border around the main DIV as a test to see what was going on.  This showed just a line, which was above the menu item.  So, I put a height style into the main DIV and it worked! 

I tried finding a solution for the issue on the web but nothing was really that good or straightforward so I decided to put this little tidbit on here.  But I also realize now you can use the "w3-container" class.

Note, I also used OnMouseOut event for when the DIV doesn't have the mouse over it anymore.  Most of this functionality was written in javascript and jQuery.

Comments

Popular posts from this blog

Alexa Is Listening, Recording, and Sending!

Check out this story where a couple in Oregon was having a private conversation and Alexa recorded and sent the conversation to one of their contacts!  They were not aware until the contact contacted them about what had happened.  The couple contacted Amazon and they verified the series of events.  But what's even more bizarre is the couple wanted to return their Amazon home devices but Amazon has not agreed to return the costs for the devices! Check out the article here  by Bruce Brown on  Digital Trends

Cybersecurity

I went to a Cybersecurity conference last week hosted by  Data Connectors and I want to give kudos for the job well done in running the conference.  First of all they held the conference in a very nice Westin downtown, so the facility was great!  The Vendors were very informative and the presentations were very good as well!  There was a good mix of breaks so we could talk with the Vendors and learn more about their products.  The lunch and snacks were good too!  Always a plus! But back to the subject of Cybersecurity.  It's truly amazing all the cyber attacks made against companies, websites, home owners, smart phones, etc.  I don't remember the exact numbers, but at the time they presented them, I was amazed how high it is, and how high it's going to be.  Everything on the web is exposed and most people don't realize the bad exposure that's out there.  Yes, bigger companies are spending lots of money to protect their data but the ...

My Twitter Followers Have Gone Down!

If you're a Twitter user you might have heard or seen on your account the number of followers go down.  For some of us, those numbers might be minimal.  I have a Twitter account @NKYSports which I use in connection with one of my High School sports website NKYSports.com.  Last week I had about 6,070 followers.  That number today is down about 100.  But I have heard users who have followers over 50K, 100K, etc. losing thousands and thousands of "so-called" followers. So what happened?  Twitter has started cleaning accounts due to fake news scandals and data privacy.  That equates to about 1 million accounts the past quarter (2nd Q of 2018).  Twitter CEO Jack Dorsey says improving the health of the platform is critical for future growth. Twitter has been a great tool for my website, but I also like getting updates sent directly to my phone to get the latest news, sports, weather, etc.  I know what to believe and not to believe as well!...