Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Jquery click link to .show loader unless link has class

I have a jquery function that .show() my "loading screen" by adding .loader class that wraps the entire body when I click on any links. But there are some links I don't want to show the .loader class. If I add a class to some of the a tags like no-load, can I use jquery's hasClass to not run the .loader function? Does anyone know how to do it?

Here's my code that works for all my links:

$(function () {
$('ul.menu a, .logo-img a').click(function () {
  $('.loader').show();
  });
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can try using .not() like:

$('ul.menu a, .logo-img a').not('.no-load').click(function () {
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!