TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ganeshkumar Lingappan
NA
112
31.1k
Could not position the SVG Element.
Aug 5 2016 1:09 AM
I need to place the SVG element at the custom position For example my svg element should place at the x=100 and y=100 th position.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
var item = ('<svg height="50" left="100px" top="100px" display="block" width="50"><line x1="100" y1="100" x2="150" y2="150" style="stroke:#ff0000;stroke-width:2" /> </svg>')
$("#container").append(item);
});
});
</script>
</head>
<body>
<button id="btn" height = "30" width="100">Click</button>
<div id="container" height="300" width="300"></div>
</body>
</html>
In the above code snippet my element should be placed inside the div at the button click action.
Please revert me back if anyone have the concerns
Reply
Answers (
6
)
If username stored in local storage open new web page
Display Indian currency format in jquery Data Table.