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

2018 Goals Update

Wow, the month of January 2018 has flown by!  I cannot believe it's Feb 1 already!  But I will say I've been pretty happy with the progress of keeping my goals for the 2018 year!

Here's what I've kept to thus far:

1. Recite the Optimist Creed every morning (well at least during work days)

2. No more Mountain Dew in the morning

3. I've learned PHP and in the progress of learning C# and ASP.net (progress is good!)

4.  I'm almost finished reading Soft Skills by John Sonmez (trying to read 1 book per Quarter)

5. Family vacation to Disney has been booked!

6. Blog has been started!

Book Review: The New Psycho-Cybernetics

The book The New Psycho-Cybernetics by Dr. Maxwell Maltz is truly an amazing book!  This book should be read by everyone!  Whether your self-image is good or bad this book talks about taking steps to improve your self-image, live a longer life, and ultimately be happy!

I myself feel like I have a good self-image, my self-esteem is high and overall I'm an optimistic and happy person.  But I can see how a book like this can help me strive for higher achievements and help me to reach those higher goals!

For those with poor self-images and low esteem this book will benefit you immensely.  The book talks about several examples where people have been down, sick, lonely.  But have gone through the exercises in the book and come out with a much better self-image and becoming much more happy.

There are so many examples in the book its hard to cover them all and that's why I will definitely be reading the book again, as well as a reference for future inspirations.  Towards the end of th…

Ways To Avoid Developer's Burnout

Last night I read an article by Adris Azeez called Avoiding Burnout as as Software Developer and it got me thinking about the steps I take to avoid burnout, boredom, etc.

Several of the ideas Adris talks about are very similar to what I already do, but the main point is to change things up, take a break when needed, and if you're not in "coding" mode do something else that's productive.
As a developer for over 20 years I can honestly say there are days where the "ideas" and "code" just doesn't flow.  So here are a few things I do to still be productive at work when I'm developing:
1) Work on a "fun" project: sometimes when you work on the same project for several days/weeks, the brain needs a break.  I find that if I focus on something new it refreshes my mind and the creative juices start flowing again.  For example, I store several "fun" projects in my head to develop in the future.  Recently, I developed a new March …