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 8014831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:04:02+00:00 2026-06-04T20:04:02+00:00

im using jquery to add a quickmenue to my website. my source code is

  • 0

im using jquery to add a quickmenue to my website.
my source code is like this :

var span = $('body').append('<span id="quickmenu">');
       $('#quickmenu').css('position','fixed')
              .css('background-color','white')
              .css('border','4px solid black')
              .css('border-left','0px solid black')
              .css('top','15px')
              .css('left','0px')
              .css('font-family','Calibri')
              .css('font-size','14px')
              .css('line-height','0px')
              .css('color','#777777')
              .css('text-align','center');

My problem on that is, everything works really fine in FF and Chrome, but IE9 isn’t showing anything to me.

So i tried some alerts() after accessing the above code…:

alert('I run'); // I run
alert(span); // [object Object]
alert($("#quickmenu")); // [object Object] 
alert(span == $("#quickmenu")); // false

So i seems to be created , but not shown?!

I really have no idea what went wrong there,…. Console shows no errors in FF and IE9

Any ideas ?! :-/

  • 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-06-04T20:04:04+00:00Added an answer on June 4, 2026 at 8:04 pm

    I believe the code is running too early. You need to wrap your code in the document ready function:

    jQuery(document).ready(function() {
    
    //your code goes here
    
    });
    

    I would in fact change your function to something like below:

     jQuery(document).ready(function(e) {   
        var span = $('<span id="quickmenu" >')
            .css({
                'position':'fixed',
                 'background-color':'white',
                 'border':'4px solid black',
                 'border-left':'0px solid black',
                 'top':'15px',
                 'left':'0px',
                 'font-family':'Calibri',
                 'font-size':'14px',
                 'line-height':'0px',
                 'color':'#777777',
                 'text-align':'center'
            })
            .appendTo($("body"));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using JQuery it possible to clone a Div like this and change add a
I am using jQuery to add some dynamic content to a website. I am
I'm using the Jquery date/datetimepicker add-on(s), as well as JQgrid. I'd like the onShow
I am using the Jquery table addrow plugin to add row dynamically, the code
I am using Jquery to dynamically add some HTML into a page. Now this
I am using Jquery to add a class to a div like so... somediv.addClass('correct').removeClass('wrong');
I'm using jquery to add rel=brochure using $('.imageOuter a').attr('rel', 'brochure') this works as expected.
I have the following HTML: <div id=dynamicRadioButtons> </div> Using jQuery I'd like to append
Hard to explain this one, but here it goes: I'm using jQuery to add
I am using jQuery to add placeholders to each text box on a page.

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.