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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:43:15+00:00 2026-06-09T10:43:15+00:00

Firstly, I am new to jQuery, coming from a Java background, so apologies if

  • 0

Firstly, I am new to jQuery, coming from a Java background, so apologies if this question seems a bit weird.

Basically, I have two sepereate unrelated elements on a page, and based on the selector results from one, I need to change the styling on a second element.

I need to check for:

$("#slide1.current")

Once found, I need to execute the following:

$('.asset.assetStyleNone.assetCount1').removeClass('assetStyleNone').addClass('currentSlide');

I guess what I ideally need to do is something along the lines of:

$("#slide1.current").XXX(function() {
 $('.asset.assetStyleNone.assetCount1').removeClass('assetStyleNone').addClass('currentSlide');

});

But my problem is knowing what the ‘XXX’ should be. I do know that it cannot be a ‘click’ event, as there are no interactive clicks that change the state of elemenst on this page.

Is this kind of thing possible in jQuery?

Thanks in advance for your help.

  • 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-09T10:43:16+00:00Added an answer on June 9, 2026 at 10:43 am

    If you want to check if #slide1.current exists, use this:

    if($("#slide1.current").length>0) { 
         $('.asset.assetStyleNone.assetCount1').removeClass('assetStyleNone').addClass('currentSlide');
    }
    

    Note, this check only takes place once, I’m not sure you want a callback on the event your selected element is created.

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

Sidebar

Related Questions

Firstly I am new to android and Java so this is a beginners question.
see fiddle Firstly i am new to jquery. i have to make one cell
Firstly this is not a homework question. I am practicing my knowledge on java.
Firstly, I'm new to Android (so I apologize if this question is ignorant) but
Firstly, I am new to both android and Java. I have two classes, my
Firstly, this is qtip, a jQuery plugin: http://craigsworks.com/projects/qtip2/ Basically it makes pretty tooltips. I
http://jsfiddle.net/Cyjye/ I m new to jquery. I have made html table shown in jsfiddle.Firstly
Firstly, I'm new to Python, Qt and PySide so forgive me if this question
Firstly some background,.. IVe started a new job as PHP developer with a company
Firstly, this is a homework assignment, and I am very new to programming in

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.