Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jquery slider won't work...

Featured Replies

Hello everyone.

 

i've recently been trying to get to grips with jquery. Proving challenging.

 

All I want to achieve is a set of three rotating images on my home page but I'm obviously doing something wrong with my coding.

 

I think my problems start when I write this code... #jq-slider img { display:none; }

 

It just makes my images dissapear but according to the tutorial i'm following it has to be there in order for the jquery to work.

 

Anyone have any ideas where I'm going wrong? Thanks in advance, you people are the greatest!

 

#jq-slider {

width: 980px;

height: 350px;

margin: 0 auto;

overflow: hidden;

}

 

 

#jq-slider img { display:none; }

 

#jq-slider .is-showing{

display: inlne;

}

 

<div id="main_image">

<div id="jq-slider">

 

<img src="./images/main-banners/home-banner-1.png" height="350px" width="980px" alt="image 1" class="is-showing"/>

<img src="./images/main-banners/home-banner-2.png" height="350px" width="980px" alt="image 2"/>

<img src="./images/main-banners/home-banner-jeff.png" height="350px" width="980px" alt="image 3"/>

</div>

 

 

 

</div>

 

<script type="text/javascript">

$(document).ready(function(){

slideShow();

});

 

function slideShow() {

var showing = $('#jq-slider .is-showing');

var next = showing.next().length ? showing.next() : showing.parent().children(':first');

 

showing.fadeOut(800, function() { next.fadeIn(800).addClass('is-showing'); }).removeClass('is-showing');

 

setTimeout(slideShow, 5000);

 

}

 

</script>

It would help if you can post all the code you have in your web page

because what you have shown so far is missing something important

and a link to the tutorial.

Hi Gregor, at a glance I noticed that the word inline is misplelt here:

 

#jq-slider .is-showing{

display: inlne;

}

 

So even when the is-showing class is added with jquery it won't display.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.