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 a KornShell (ksh) script that sets an array the following way:
I have written the following script to get the value of hidden field to
I have written the following simple test in trying to learn Castle Windsor's Fluent
I have written something that uses the following includes: #include <math.h> #include <time.h> #include
I have the following in a program (written in VB.NET): Imports Microsoft.Office.Interop.Excel Public Class
(All of the following is to be written in Java) I have to build
I have written some code in my VB.NET application to send an HTML e-mail
I have written a ruby script which opens up dlink admin page in firefox
I have written the following code and not able to figure out the errors
I have written the following code to write a file on my local file

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.