Solved

SVG Elements - hover effect and z-index

Posted on 2013-06-23
3
934 Views
Last Modified: 2013-06-24
Hi

Im trying to use SVG to create something similar to the attached graphic. Essentially they are a collection of categories symbolised by the circles. Each cartegory/circle has a lot of textual information associated with it that is shown when the circle is clicked.  This data is stored in a DB. Also there is a hover effect that shows a snippet of data(as seen on graphic)

I have created the following as a quick test:
https://www.app-cessories.co.uk/canvas/zoom/demo/paultest3.html

If you hover on top left circle it enlarges to depict the hover effect. How can i change the z-index of this? it currently sits below the adjacent circle and should be on top...

Also, do you think SVG is the best method to try and tackle this task? i did attempt html5 canvas but couldn't access each circle individually which i will need to do to be able to retrieve data from a database that is shown when each circle is clicked

Thanks
0
Comment
Question by:coolispaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39269805
You cannot with z-index.
You could with jquery change the element order - i.e. on hover move that circle to be the last element in the block - this is assuming you will be doing the same for the other circles...
...if not then just move it to the end.
0
 

Author Comment

by:coolispaul
ID: 39269810
how do i move it with jquery?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39269827
$('body').on('mouseover', '#circle1', function () {
$hoverText.show();
$(this).appendTo("#svg_ID") // add an ID to the svg.
$(this).css('transform', 'translate(-100px,-50px) scale(2)');
}); 

Open in new window

0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question