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

  • Home
  • SEARCH
  • 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 8563035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:52:02+00:00 2026-06-11T16:52:02+00:00

There are tags with attributes id like this <span id=attr35></span> <span id=attr44></span> <span id=attr23></span>

  • 0

There are tags with attributes id like this

<span id="attr35"></span>
<span id="attr44"></span>
<span id="attr23"></span>

Need to set the style to them like this (last two digits might be any)

$("span[id=attr???]").setStyle({'display':'inline'});

Is it possible?

  • 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-11T16:52:03+00:00Added an answer on June 11, 2026 at 4:52 pm

    You use valid Selectors API selectors.

    $("span[id^=attr]")
    

    If you want more than one match, use $$

    $$("span[id^=attr]")
    

    Oops, one more issue. You should use .invoke if you are getting multiple matches. You can’t call setStyle directly on the returned set.

    $$("span[id^=attr]").invoke("setStyle", ...)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are many people that mark closing tags like this to help identify the
The new forms attributes and tags in HTML5 are great. Unfortunately, there is only
Is there a way to specify pretty-print-like formatting around HTML tags? I want to
Is there any way to enclose <style> tags within <body> and still have valid
there are some code as this: <div class=test> <div class=upsell-tags> <?php echo $this->getChildHtml('product_additional_data') ?>
Insert attributes (strings) within existing tags. I need to insert the number found within
For some complicated reason, I need to mark some Javascript as special, like this:
I am using this script to parse HTML tags in order to convert them
I am traversing checkboxes like this: $('.day').each(function() { // here I need to get
I have some old jsp code that uses the struts tags inside attributes, like

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.