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.

Any Bootstrap gurus able to help with my carousel issue

Featured Replies

Hi guys and gals,

 

Although I've been a 'lurker' for a while, I finally jumped in and registered.

 

I have an issue that has got me stumped and I would be very grateful if someone might be able to assist.

 

The website I have is here: http://smarter.uk.com/current-project (currently in dev) and I'm trying to get the carousel to change when you mouse over a thumbnail (on the left) but also to fade in.

 

The issue I'm getting is that the first time I mouse over, the item fades in, but the second time you do it on the same item, it doesn't fade (the "opacity: 1" is 'stuck').

 

Does anyone have any experience with this. I'm using jQuery for the fade as it needs to be as backward compatible as possible... it's frustrating as a few lines of CSS3 would have this working perfectly (on modern) browsers.

 

Thanks in advance :)

TM

what you can do is set the opacity back to 0 after you have hovered over a new item

so it would be something like

$('[data-target="#home-feature"]').on('hover', function () {
    // put opacity to 0 agan
    $('.home-feature-right-content').css('opacity', 0);

    // Fade in the div now

});

Edited by D4Y0

  • Author

Hey D4YO,

 

Wow, I've just tried an adaptation of your code and I'm slapping myself in the face - great stuff, thank you very much.

 

Thank you very much for actually looking at the site too.

 

It very very very nearly works now.

 

The only slight issue is that by default, slide 1 is visible at the start. When I then hover over it, it disappears, until I hover over other. Very very minor, I know but I can't quite figure out how to fix it. It's literally just slide 1 that needs to be exempt from opacity: 0 on the first hover... maybe something like a rule to say if it HASN'T got the active class... then fade... I just can't quite figure it out...

 

Any ideas?

 

My JS file is here, and the line I added from your example is on line 9. If you see weird stuff going on it's just me trying to figure this out :)

 

http://classroommonitor.smarter.uk.com/wp-content/themes/classroom-monitor-child/assets/js/custom.js?ver=1.0

  • Author

Yeah it's there now...

 

I've reverted it to when I had just added a bit from your code:

 

$('.home-feature-right-content').css('opacity', 0);

I think it might even be a case of using the slide-index again.

 

JS is here: http://classroommonitor.smarter.uk.com/wp-content/themes/classroom-monitor-child/assets/js/custom.js?ver=1.0

 

Just go to http://classroommonitor.smarter.uk.com for the homepage.

 

Thanks again

  • Author

Hi again!

 

I got around the issue! But it had one major flaw, which I've sort of got around, but have unearthed another problem.

 

Basically, the slider I'm creating needs a base slide that's open when you're not on the current button (which I didn't realise until celebrating figuring out the first issue and thinking I could put this behind me!)

 

The issue is, is that I need to keep the slide open if the visitor hovers on the slide itself (not the button).

 

Currently if you hover over the slide, it changes correctly, but then if you move your mouse to the slide in question, the slide disappears.

 

I think my brain is seriously frazzled as this doesn't seem that complex...

 

If you've got any ideas on this I would seriously appreciate them!

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.