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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:20:05+00:00 2026-05-15T22:20:05+00:00

I am taking the value of a select element and trying to modify it

  • 0

I am taking the value of a select element and trying to modify it so that I can have access to the onscreen preview element that the select item represents. Here is the first part of the code…

$("#single_area_select").change(function(){
        var $element = '#preview_' + $("#single_area_select").val().toLowerCase();
        elementChangedOrSelected($element);
    });

And the critical part of the elementChangedOrSelected() method…

function elementChangedOrSelected(element){
    element = '$("' + element + '")';
    alert(element);
    var position = element.position();
    alert(position);

My first alert makes it look like i’ve got it right (ie, $(“#preview_title”) ), but the second alert doesn’t make an appearance which tells me that the position query is failing. Can anyone see something that I can’t?

  • 1 1 Answer
  • 2 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-15T22:20:05+00:00Added an answer on May 15, 2026 at 10:20 pm
    function elementChangedOrSelected(element){
        element = $(element);
        alert(element);
        var position = element.position();
        alert("left: " + position.left + ", top: " + position.top);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to modify a name-related element. I'm taking values from a drop-down and
I have a classifier column that can have value of X or Y. My
I'm trying to select a element that meets certain criteria. Right now I'm doing
Can someone explain why unsigned int is taking a negative value? An unsigned int
I have been trying to put together something that allows me to extract points
I am using following code: <select class=element select medium id=inDistrict name=inDistrict onchange=setCookie('lastvalue',this.value,1);> It is
I create a function of jquery that get the value from the select box,
I have a stored procedure that SELECT s the TOP 1 record from the
I have a plain select element, which I'm setting to the first option. <select
I am taking the amount from one select box and duplicating a div that

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.