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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:09:28+00:00 2026-06-18T03:09:28+00:00

Following is what i am using to inject a style which needs to be

  • 0

Following is what i am using to inject a style which needs to be applied to a Div which has a combination of these two styles : .noindex and .ms-wpContentDivSpace

<script>
$(document).ready(function(){
$('.noindex, .ms-wpContentDivSpace')..css({
   overflow: auto,
   height : '150px'
});
});
</script>



<style> 
    .autoScrolListViewWP 
    {   
        HEIGHT: 150px; 
        OVERFLOW: auto 
    } 
</style>
<script> 
    $(document).ready
    (
        function()
        { 
            $('.noindex, .ms-wpContentDivSpace').addClass('autoScrolListViewWP');
        }
    );
</script>

Well but what I need is that above new CSS autoScrolListViewWP should get added to only those element where css combination is just for these two classes .noindex and .ms-wpContentDivSpace

But above script would apply style to any combination of css where those two class exists. E.g. .ms-WPBody , .noindex and ms-wpContentDivSpace autoScrolListViewWP

My question is how do i identify only a spcific combination of CSS classes ?

  • 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-18T03:09:29+00:00Added an answer on June 18, 2026 at 3:09 am

    A solution is to get all the elements with the two classes, then iterate through them and see if they have other classes. I.e:

    $('.noindex.ms-wpContentDivSpace').each(function(i, elem) {
        var classes = elem.className.split(/\s+/);
        if (classes.length === 2) { // they should have only these two classes
            $(elem).addClass('autoScrolListViewWP');
            // alternatively elem.className += ' autoScrolListViewWP'; (untested)
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Unity to inject a context and using the following lifetime manager... public
I'm currently using StructureMap to inject instances of NHibernate ISessions using the following code:
I have the following function for using ZenDesk. I'd like to inject my current_user
I am attempting to inject an object into my saga. Using the following endpoint,
A site exists for which I must re-style the front-end template using existing markup,
My Java EE app uses crawler4j which starts the crawl using the following code:
Suppose I have the following: using(var ctx = DataContextFactory.Create(0)) { ... Some code ...
Is is possible to do the following using nginx rewrite: Convert a url from
How would one shorten the following using ternary operators? if ((pos - maxPos) ==
I tried to achieve the following using Twitter Bootstrap 2.0 and it's popover-plugin, but

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.