Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:47:42+00:00 2026-05-25T18:47:42+00:00

I have written the following in a JavaScript method : <html> … <script type=text/javascript

  • 0

I have written the following in a JavaScript method :

<html>
...
<script type="text/javascript" charset="utf-8">

$(function() {

    $('#layout').svg({});

    var svg = $('#layout').svg('get');
    svg.rect(150, 50, 100, 50, 10, 10, {fill: 'grey'});
    svg.text(200, 75, "Some Text", {'font-family':"Verdana", 'font-size':20, 'text-anchor':"middle", 'fill':"#00ff00"});               

    $('#layout').click(function(e) {
        $(this).slideDown("slow");                    
    });
}
...
<body>
    <div id="layout" style="width: 640px; height: 480px;"></div> 
</body>
</html>

Ultimately I am trying to get ‘layout’ to move across the browser window. However I cannot get the ‘layout’ to move in anyway using slideDown() or animate(). How to I accomplish the effect?

—– Update (September 25, 2011) ——

I got it work with the following code. Thanks to Jason for tipping me off on the problem:

<html lang="en"><head><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8">

...

    <style type="text/css">
        #layout {
            background: #6699FF;
            height: 480px;
            width: 640px;
            position: relative;
        }
      </style>       

    <script type="text/javascript" charset="utf-8">

        $(function() {
            $('#layout').svg({});

            var svg = $('#layout').svg('get');
            svg.rect(150, 50, 100, 50, 10, 10, {fill: 'grey'});

            svg.text(200, 75, "SomeText", {'font-family':"Verdana", 'font-size':20, 'text-anchor':"middle", 'fill':"#00ff00"});

            $('#layout').click(function(e) {
                $("#layout").animate({opacity: "0.1", left: "-=800"}, 500);                
            });
        });        

    </script>
</head>
<body>
    <div id="layout"></div>            
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:47:43+00:00Added an answer on May 25, 2026 at 6:47 pm

    If you’re trying to get a div to move across the entire window, regardless if it contains SVG or not, make sure its position is absolute in the CSS. You can then animate the left and top properties with jQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written the following piece of code in my view page <script type=text/javascript>
I have written a Custom Control that contains the following: [assembly: System.Web.UI.WebResource(InSysControls.AssignmentLists.AssignmentLists.js, text/javascript)] namespace
I have found the following script which is apparently written using the javascript framework
I have written the following function but it's isn't returning anything when I run
Friends, I have written the following JavaScript to ascertain which row of an tabular
I have written following function which checks whether start_date field is not empty and
I have written the following contact form validation script. How can I validate a
I have the following code, written using jQuery: var strval = '22' $(#quicknote).attr(href, javascript:location.href=/'http://site.com/notes/add?projects=/'+
I have written a HTML page which has following code. <div id=adsListContainer style=margin: 5px;>
i have written one javascript function to retrieve the position of a button and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.