Navigating the webpage filled with tabbed information

I'm encountering some laggy scrolling issues on my website, specifically within the tabbed gallery section that was created using jQuery. I've noticed that when I try to scroll while an image tab is active in the gallery, the scrolling performance is not smooth at all.
Can someone please assist me in resolving this problem? Here's a snippet of the code related to the tabbed gallery:
HTML (Jade):

article.content-box.gallery#osom
  ul#homepagetabs.gallerytabs(data-tabs="tabset1")
    li.tabs#tab7(data-tab="t1")(style="background-image: url('http://static1.gamespot.com/uploads/original/1551/15511094/3066900-legends-1940x1095.png')")
  #tabset1.gallery             
    #t1.tab.is-acive.current(style="background-image: url('http://fastup.pl/data/Aueternum/Rzeczy%20cyca/maxresdefault.jpg')")

CSS (Stylus):

.tab
  display none
  animation: animacja
  animation-duration: .3s
  animation-iteration-count: 1
  animation-timing-function: ease-in-out
  animation-fill-mode: both
  &.is-active
    display block
    width: 100%
    height: 85vh
    background-position: center
    background-size: cover
    border: 5px solid $pink
.gallerytabs
  display: flex
  margin: 0
  padding: 0
  align-items: center
  width: 100%
.tabs
  flex: 1
  height: 70px
  margin: 25px 5px
  background-position: center
  background-size: cover
  border: 1px solid $pure-pink
  filter: grayscale(100%)
  transition: 0.3s ease-in-out
  position relative
  z-index 1
  &:hover
    filter: none
    cursor: pointer
  &.is-active
    filter: none
.gallery
  width: 100%
  height: 100vh

JS (jQuery)

$('[data-tab]').on('click', function() {
  var $btn = $(this).attr('data-tab');
  var $wrapper = $(this).parent().attr('data-tabs');
  var activeClass = 'is-active';
  $('[data-tabs='+$wrapper+']'+' [data-tab]').removeClass(activeClass);
  $('[id='+$wrapper+']'+' .tab').removeClass(activeClass);
  $(this).addClass(activeClass);
  $('[id='+$btn+']').addClass(activeClass);
});

You can view the webpage here to witness the laggy effect.

Answer №1

It appears that the issue may be due to oversized images on your website. By taking a quick look at your site using Chrome dev tools, it is evident that this could be the cause. Consider optimizing the resolution of your images for better performance.

https://i.sstatic.net/e7ViO.png

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Error: Attempting to change a read-only property "value"

I am attempting to update the input value, but I keep receiving this error message: TypeError: "setting getter-only property "value" I have created a function in Angular to try and modify the value: modifyValue(searchCenter, centerId){ searchCenter.va ...

Error: Selenium-Javascript tests encountering an unexpected token issue

Having worked with Selenium using Java for a long time, I decided to switch gears and start writing Selenium scripts in JavaScript. I found a helpful guide to learn JavaScript with Selenium, which you can check out here. However, when I attempted to run n ...

Why is it that the .forEach() function has the ability to alter the Vuex state?

After extracting two sets of balances from my vuex state, I decided to merge them into a new array of entries. However, an error is thrown when I try to loop through my copies of the vuex state. Am I missing something? It seems that the issue lies in the ...

Issues with Ajax response causing PHP and HTML submit button to not function properly

When I have an input on my webpage that is linked with AJAX, it searches for a name in the database and returns the result as an HTML form with values from the database. However, the submit button within the form is not functioning properly. Here is a sni ...

Bootstrap implementation for personalized notifications

I am utilizing bootstrap notifications to display important messages to my users. Within my code, there is a DIV element named <div class="notifications bottom-right"></div> Theoretically, the library should be handling the JavaScript. I ha ...

Guide to separating the bytes of a number and placing them into an Uint8Array

I am looking to convert a JavaScript number into the smallest possible uint8array representation. For example : 65 535 = Uint8Array<[255,255]> (0b1111111111111111 = [0b11111111, 0b11111111]) 12 356 = Uint8Array<[48,68]> (0b0011000001000100 = [ ...

Achieving two-way data binding using a Service in AngularJS - Step by step guide

Searching a JSON file, extracting data to create a table, and continuously monitoring for updates to display in real-time is a challenging task. Despite multiple attempts with AngularJS, achieving this has been elusive. Below is the code snippet: app.js ...

Views.py in Django fails to properly retrieve POST request parameters, resulting in a return value

I am struggling to retrieve the value of "taken_name" from an HTML form in Django views using a POST request. Despite trying various solutions found in online forums, I have been unable to identify the simple mistake causing this issue for nearly two hours ...

Creating interactive maps with dynamically added area tags using JavaScript

I am looking to dynamically load an image and add a map tag to it. The coordinates of different areas (such as circle coordinates) are coming from a database and I need to add those areas to the map tag dynamically using JavaScript or jQuery in a loop. I ...

Caution: "Detected x instances with duplicate IDs" in the REACTJS API REST

I am facing an issue with my form. The console is displaying a warning "Found x(number of books) elements with non-unique id". As a result, the information displayed for each book is duplicated because the id is not being recognized. I need help in ident ...

No firing event issue with Cordova's In App Browser on IOS

Seeking help to authenticate users on my Ionic application using an external service, and I need to utilize Cordova's InAppBrowser. The code functions correctly on Android, but on iOS, the "loadstop" event never triggers, preventing the browser from r ...

Hovers and click effects for navigating through images

The website I'm currently working on is stipz.50webs.com. p.s. HOME functionality is not active at the moment. Having successfully implemented the onhover and onmouseout features, my next goal is to enhance the navigation effects for each div/img so ...

Retrieving FormData using ajax and passing it to aspx.cs code

After adding a debugger in the console, I am receiving confirmation that the file has been uploaded successfully. However, the debugger is not reaching the code behind, or in other words, the code behind is not accessible. This is the JavaScript file: fun ...

Tips for optimizing the placement of div elements for top advertisements on Amazon's website

I'm looking to overlay some divs on top of Amazon.com ads, similar to the image above. This is part of a personal project where I need to position these divs precisely over the ads. To achieve this effect, I've been using getBoundingClientRect t ...

Loop through the JSON array and append every value to the list within AngularJS

I'm just starting to learn about Angular JS and I have a question. I receive a JSON array as an AJAX response from a PHP page. I want to iterate through this JSON array and push each value into a list like this: angular.forEach($scope.companies.area, ...

Error message: 'firebase/app' does not export 'app' (imported as 'firebase') - Import attempt failed

Encountered a strange issue today. As I tried to import firebase, an error popped up: ./node_modules/firebaseui/dist/esm.js Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase'). The setup ...

I am currently working on a project where I must verify the Pass or Fail icon using Selenium WebDriver for my application

This is the code snippet found in the application div id="StatusCircle" style="float: right; width: 50px; height: 50px;-webkit-border-radius: 25px;-moz-border-radius: 25px;border-radius: 25px;background: RED;" - indicating failure div id="StatusCircle" ...

Sharing the same instance of a class across various entry points in webpack output: A guide

Are separate instances of a class created when it is imported into different entry-point files of webpack? I need to import a class called AJAX and maintain the same instance throughout the project across all entry-point files. Currently, AJAX is used as ...

The random number generator often omits both the upper and lower limits

I am working with an array that contains letters from A to H. However, when using a random number generator, I have noticed that the letters A and H are rarely selected. How can I adjust my approach to make sure these two bounds are included more often? ...

ASP.NET showcases icons in a distinct manner compared to HTML and CSS

I'm encountering an issue while trying to convert HTML/CSS to ASP.NET. In the original HTML, the icons were arranged in a single row of four icons, and for mobile devices, they were displayed in 2x2 rows. When I attempted to copy and paste the HTML wi ...