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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:29:21+00:00 2026-06-17T09:29:21+00:00

I’m having a problem using the :not() selector/excluder. What I’m doing is adding an

  • 0

I’m having a problem using the :not() selector/excluder. What I’m doing is adding an ‘.Activated’ class to opened accordion panels (with class’.panel’). Then when hovering all elements with the ‘.panel’ class I want to run a function. However there will sometimes be elements with both classes ‘class=”panel Activated”‘ that I don’t want to run the function on.

Also here is some of my relevant code:

function onOpenPanel(obj){
        var slideR = obj.index + 1;
        $('.panel:nth-child(' + slideR + ')').addClass('Activated');
    } 

$('.panel:not(.Activated)').hover(function(){
        $(this).css('background-position','0px top');
    },function(){
        $(this).css('background-position','-41px top');
    });

You’ll notice on the site that on the opened accordion panels the background jumps 41px because the my :not() selector isn’t picking up that the panel also has the ‘.Activated’ class and therefore shouldn’t be affected by the .hover function.

HTML:

<div class="accordion">

    <!-- First slide -->

    <div>
        <img src="img/img-1.jpg" width="10" />

        <div class="caption">
        <p class="mask-1"></p>
            <p class="title sl1">
                Professional Products & Solutions
            </p>
            <p class="body one">As a global leader across many sectors, Sony Professional combine world class knowledge with groundbreaking technology – inspiring businesses to amaze their customers.<br />
            </p>

        </div>

    </div>

    <!-- First slide -->

    <!-- Second slide -->

    <div>
        <img src="img/img-2-1.jpg" />

        <div class="caption">
        <p class="mask-2"></p>
            <p class="title sl2">
                4K Digital Cinema
            </p>
            <p class="body two">Taking digital cinema to new levels of immersive engagement, the superior resolution of Sony 4K creates the ultimate in crowd-pleasing experiences – partner with us for business growth.
            </p>

            <a href="http://stg.sony.co.uk/pro/hub/digital-cinema" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Second slide -->

    <!-- Third slide -->

    <div class="sonySlideIn">
        <img src="img/img-3.jpg" />

        <div class="caption">
        <p class="mask-3"></p>
            <p class="title sl3">
                Broadcast & Pro AV
            </p>
            <p class="body three">Shoot, edit, broadcast, archive. Whatever your priority – from image quality to production efficiency – Sony enables you realise your vision without compromises.
            </p>
            <img src="img/prod-3.jpg" width="400" height="98" id="prod-3"/>
            <a href="http://stg.sony.co.uk/pro/hub/broadcast-professional-audio-video" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Third slide -->

    <!-- Fourth slide -->

    <div class="sonySlideIn">
        <img src="img/img-4.jpg" />

        <div class="caption">
        <p class="mask-4"></p>
            <p class="title sl4">
                Industrial Cameras
            </p>
            <p class="body four">From machine vision to visual communications and OEM conference solutions, see how the application of Sony imaging expertise delivers market-leading solutions for industrial environments.
            </p>
            <img src="img/prod-4.jpg" id="prod-4"/>
            <a href="http://stg.sony.co.uk/pro/hub/industrial-machine-vision-cameras" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Fourth slide -->

    <!-- Fifth slide -->

    <div class="sonySlideIn">
        <img src="img/img-5.jpg" />

        <div class="caption">
        <p class="mask-5"></p>
            <p class="title sl5">
                Medical
            </p>
            <p class="body five">Driving the future of medical imaging by redefining clarity across monitors, cameras, radiology imagers, printers and recorders, Sony Medical creates pioneering solutions – including 3D – that enable clearer diagnoses and more efficient workflows.
            </p>
            <img src="img/prod-5.jpg" id="prod-5"/>
            <a href="http://stg.sony.co.uk/pro/hub/medical" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Fifth slide -->

    <!-- Sixth slide -->

    <div class="sonySlideIn">
        <img src="img/img-6.jpg" />

        <div class="caption">
        <p class="mask-6"></p>
            <p class="title sl6">
                Projectors, Displays & Digital Signage
            </p>
            <p class="body six">Designed to attract attention, engage interest and add the wow factor to professional environments, Sony bring superior image quality to businesses, organisations, education establishments and venues of every size. 
            </p>
            <img src="img/prod-6.jpg" id="prod-6"/>
            <a href="http://stg.sony.co.uk/pro/hub/displays-projectors-digital-signage" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Sixth slide -->

    <!-- Seventh slide -->

    <div class="sonySlideIn">
        <img src="img/img-7.jpg" />

        <div class="caption">
        <p class="mask-7"></p>
            <p class="title sl7">
                Sports & Stadiums
            </p>
            <p class="body seven">Maximising customer engagement and satisfaction, our range of leading AV solutions for large arenas drives footfall, spend, loyalty and advocacy – see the advantages of partnering with Sony.
            </p>
            <a href="http://stg.sony.co.uk/pro/hub/solutions-stadiums-arenas" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Seventh slide -->

    <!-- Eigth slide -->

    <div class="sonySlideIn">
        <img src="img/img-8.jpg" />

        <div class="caption">
        <p class="mask-8"></p>
            <p class="title sl8">
                Video Security
            </p>
            <p class="body eight">See the most technically advanced, network based, end-to-end video security solutions – from hybrid and Full HD IP cameras to recorders and third-party compatible software.
            </p>
            <img src="img/prod-8.jpg" id="prod-8"/>
            <a href="http://stg.sony.co.uk/pro/hub/video-security" class="slide-link">Read more<img src="img/cta-block.jpg" class="cta-block"/></a>
        </div>

    </div>

    <!-- Eigth slide -->

</div>
  • 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-17T09:29:22+00:00Added an answer on June 17, 2026 at 9:29 am

    jQuery selectors return the elements that match when the code is executed, so they won’t reflect later changes to the DOM after that has happened.

    Your code will bind hover event handlers to the elements that didn’t have the Activated class when the code executed (presumably at DOM ready), but adding the class won’t remove those event handlers.

    If you want them to react dynamically, take a look into event delegation.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am doing a simple coin flipping experiment for class that involves flipping a
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.