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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:16:20+00:00 2026-06-12T19:16:20+00:00

I have a problem with link buttons at jQuery. The most forum entries I

  • 0

I have a problem with link buttons at jQuery. The most forum entries I found at the web with searching for “jQuery link button deselect” handle about form buttons or checkboxes and not link buttons. So I hope someone here can help me :-).

Problem description: I have some static link bottons at my web page and with clicking on it I call a javascript function and change the text at the buttons. Now my problem is that the buttons are still selected after changing the text and this is what not should be.

index.html:

<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  <script src="jquery-mobile/jquery.mobile-1.0.min.js"  type="text/javascript"></script>
  <script src="basic.js" type="text/javascript"></script>
</head>
<body>
...
<a href="#" data-role="button" onmouseup="nextStep(1)" id="button1">Example1</a>
<a href="#" data-role="button" onmouseup="nextStep(2)" id="button2">Example2</a>
<a href="#" data-role="button" onmouseup="nextStep(3)" id="button3">Example3</a>
...
</body>

basic.js

function nextStep(buttonIndex){
  $("#button1 .ui-btn-text").text("Example4");
  $("#button2 .ui-btn-text").text("Example5");
  $("#button3 .ui-btn-text").text("Example6");
}

The code above is an example what I am doing. How described at the beginning after setting the new text the button is still selected. Does anybody know a solution to deselect the button?

Picture of selected button: http://up.picr.de/12133494ev.png

Thanks for helping :-).

Thomas

————————-


Thank you for your fast response. I tried the proposal

function nextStep(buttonIndex){
  $("#button1 .ui-btn-text").text("Example4").removeClass('ui-btn-active');
  $("#button2 .ui-btn-text").text("Example5").removeClass('ui-btn-active');
  $("#button3 .ui-btn-text").text("Example6").removeClass('ui-btn-active');
}

Unfortunately, it does not work as expectect. More precisely I can not see any changes in behavior.

Note, it’s possible your page has other elements going on that would cause such a behavior.

The buttons are part of a page with other elements (headline and table) where I change contents via javascript. But for me it is not clear how this should influence the behavior of the buttons.

Examples:

var table = document.getElementById('solution');
var cell = table.rows[1].cells[1];
cell = table.rows[2].cells[1];
cell.firstChild.data = "";
cell = table.rows[3].cells[1];
cell.firstChild.data = "";
cell = table.rows[4].cells[1];
cell.firstChild.data = "";
...

or

$("#headline").empty();
headlineOutput = "Buttons";
$("#headline").append(headlineOutput);

Any suggestions or hints?

Thank you.

————————-


function nextStep(buttonIndex){
  $("#button1 .ui-btn-text").text("Example4").blur();
  $("#button2 .ui-btn-text").text("Example5").blur();
  $("#button3 .ui-btn-text").text("Example6").blur();
}

This proposal does also no changes in behavior :-(.

I am missing something like the Qt functions “setCheckable(false) and setFocusPolicy(Qt::NoFocus)” ;-).

Thanks for helping.

  • 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-12T19:16:21+00:00Added an answer on June 12, 2026 at 7:16 pm

    I created a fiddle here: http://jsfiddle.net/japanick/Lc9rp/

    It works as expected, starting with the code you have. Can you give it a try and see if it’s working how you expected. Note, it’s possible your page has other elements going on that would cause such a behavior.

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

Sidebar

Related Questions

I'm having a problem with custom buttons in jquery mobile. <li><a href=about.php>Button</a></li> I want
i have a problem using the Catch Clipboard Events code found on this link
I have problem with Jquery UI dialog,when i click the button the first time,
I have a page in my jQuery Mobile app with two link-based buttons, I
I have a flash file menu i am having problem while link it to
I have created a jsfiddle of my problem. Here is a link to the
Similar to this question: link However I have already mastered that. My problem is
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
On pdf downlaod link need to open a jQuery dialog and have a form
This is a simplified version of my problem. I have two buttons, and one

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.