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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:41:23+00:00 2026-06-18T05:41:23+00:00

Please checkout this jsfiddle, when I click on a tag anchor I want the

  • 0

Please checkout this jsfiddle, when I click on a tag anchor I want the tag menu (div) to appear next to the anchor element but from the TOP RIGHT instead of the TOP LEFT, I have tried playing with the offset but I have not been successful thus far.

Here’s the code:

HTML:

     <div id="tag-menu"></div>
 <span class="edit-tags-wrapper" style="float:right;">
   <a rel="tag" title="show questions tagged 'jquery'" class="post-tag" href="#">jquery</a>
<a rel="tag" title="show questions tagged 'animation'" class="post-tag" href="#">animation</a>
<a rel="tag" title="show questions tagged 'tags'" class="post-tag" href="#">tags</a>
<a rel="tag" title="" class="post-tag" href="#">stackoverflow</a>

JS:

  $('a.post-tag').click(function(){
  var $this = $(this);
  var offset = $this.offset(); 
  var myPos = {X:offset.left, Y:offset.top+26}; 
  $('#tag-menu').css({left:myPos.X, top:myPos.Y, width:300, height:200}).toggle();
});

CSS:

    .post-tag{
     background:#e0eaf1;
     border-right:1px solid #3E6D8E;
     border-bottom:1px solid #3E6D8E;
     padding:2px 5px;
     color:#4a6b82;
    }
    .post-tag{
     text-decoration:none;
    }

    .post-tag:hover{
     background:#3E6D8E;
     color:#fff;
    }

    #tag-menu{
     background:#666;
     position:absolute;
     display:none;
     box-shadow:0 2px 3px #000;
     border-radius:5px;
    }

or you can checkout the JSFIDDLE to run it:

http://jsfiddle.net/EBergman/xfVaT/

  • 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-18T05:41:25+00:00Added an answer on June 18, 2026 at 5:41 am

    LIVE DEMO

    $('a.post-tag').click(function(){
    
      var $this = $(this);
      var offset = $this.offset();
      var thisW = $(this).outerWidth(); 
      var myPos = {X:offset.left+thisW-300, Y:offset.top+26}; 
      $('#tag-menu').css({left:myPos.X, top:myPos.Y, width:300, height:200}).toggle();
    });
    

    you need to take in account the menu width and the button outerWidth() to make that one work by simply doing: X:offset.left + thisW - 300

    happy coding!

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

Sidebar

Related Questions

Please check out this fiddle: http://jsfiddle.net/dppJw/8/ I've used a pseudo-element for the body (also
Please check out this jsFIDDLE <div id=wrapper> <div class=item> <div class=button_area></div> <div class=icon></div> </div>
Please i need help, this code below works fine on my localhost, php5.3+ but
Please checkout this JS Bin http://jsbin.com/iqikuf/3/edit When the below is run in the console,
iam trying to achieve this exact functionalty: http://jsfiddle.net/exttq/ BUT inside using my PHP, right
Please check out this jsfiddle http://jsfiddle.net/rr4GH/1/ As you can see its a round edge
Please, can you checkout http://svpply.com , move the pointer on a image and click
Please check out this link quickly: http://jsfiddle.net/8grSk/ As you can see the text as
Please help me on this. I want to change template page layout of cart
Please check out this http://jsfiddle.net/karthik64/JHVDn/1/ . Well I believe you got where I am

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.