Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SVG Elements - hover effect and z-index

Posted on 2013-06-23
3
Medium Priority
?
1,093 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

721 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