J82
Aug 28, 2015 02:45
Does that mean it's not possible with this particular slide? I tried reaching out to the developers but I get a mail delivery error on the email and they don't seem to be active at all on any social networks.
J82
Aug 28, 2015 02:29
I'll do that. I think someone else mentioned that in the original question as well. Thanks a lot for your help, Dave.
J82
Aug 28, 2015 02:23
When the Contact page is refreshed, there are inline styles that get added to the slide elements which cause the slider to work. However, the inline styles are not added to the slide elements when the user arrives at the Contact page by clicking on the Contact button on the upper right. Also, yes this site was built on WordPress.
J82
Aug 28, 2015 02:04
Actually, I'm not sure if it's even refiring.
J82
Aug 28, 2015 02:00
You can see a live version here: keebs.com/contact (relevant section is the `testimonials` section above the 'clients' section)

When the page is loaded, the testimonials show up fine. But then when I click on the top right button (Projects) and then click that same button again (Contact), the slider doesn't show up. However, it shows up in the DOM, so I'm a bit confused.
J82
Aug 28, 2015 01:57
I moved sssInit() into the latter part of the .load function and it seems to be refiring now. The only issue is that it refires (as I can see in the DOM), but nothing is showing. I tried messing around with the CSS thinking that was the issue, but I couldn't get it to work. Is this related to your second paragraph regarding the callback?
J82
Aug 28, 2015 01:55
Thank you so much for your help.
J82
Aug 28, 2015 01:55
Hey Dave
J82
Aug 28, 2015 01:47
Sure, I posted the full relevant code. I moved sssInit() inside the loadContact() function. Since I'm using .load, I'm not sure if I can use a callback.
J82
Aug 28, 2015 01:47
Clicking on #mail-wrap triggers the Ajax event and it's synchronous so I'm not waiting on anything to complete. I'm looking through the code but I don't see anything that would be blocking sss.
J82
Aug 28, 2015 01:47
Your code makes sense and I changed my code around to reflect yours but it looks like Super Simple Slider is still not reinitializing after hitting the #mail-wrap button. Any ideas?
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
J82
Feb 25, 2015 20:25
Can someone help me fix this little jump on slideUp()? keebs.com/dax (click "details [+]" at the bottom right of the first slide.
J82
Feb 4, 2015 09:45
Is there a way to call "this" in a function that is originally from another function?
J82
Feb 3, 2015 17:15
I got this code that adds a class of either landscape or portrait to images based on the width/height ratio and then matches the height of the portrait images to the height of the landscape images. It works ok, but sometimes when I resize the browser width quickly, the image heights don't line up between portrait and landscape. Is there some way to make sure it triggers again when I resize the browser?

$(window).on('load resize', function(){
$('.slick-slide img').each(function(){
var $this = $(this);
J82
Feb 3, 2015 16:13
@NickDugger Is there some way I can have it adjust automatically?
J82
Feb 3, 2015 16:12
Shoot. Sorry, thought I was in the CSS room.
J82
Feb 3, 2015 16:11
Having a bit of trouble with what I thought was a simple CSS issue: http://goo.gl/rrnue4

The third slide is taller than the others so it stretches out the page vertically. If the image is taller, it should reduce in width until it fits the window. Can someone help me out? (You can drag the slides with your mouse to move to the next one.)
J82
Feb 3, 2015 13:35
But it only works when I decrease the width of the browser. When I increase it back, the container's height stays the same and doesn't change.
J82
Feb 3, 2015 13:35
@JanDvorak Well I'm working with a slide that holds tall portrait mode images and wide landscape mode images. I'm trying to keep the container's height (".slick-slide") consistent while resizing the browser.
J82
Feb 3, 2015 13:28
Anyone know what might cause this to only resize when decreasing the width of the browser? When I increase it back, the height stays static.

$(window).on('resize load', function() {
var imgHeight = $('.slick-slide img').height();
$('.slick-slide').css('height', imgHeight);
});
J82
Feb 3, 2015 12:16
Anyone know why the code inside the `load resize` event isn't firing?

$(window).on('load resize', function() {
$('.slick-slide img').load(function() {
var imgHeight = $(this).height();
$('.slick-slide img').parents().css('height', imgHeight);
});
});
J82
Feb 3, 2015 11:35
Damn, this was the best I could do. I'm not sure why it's not working in the fiddle but image's parents' heights are supposed to match the height of the image. jsfiddle.net/8dudym5s
J82
Feb 3, 2015 11:15
Yeah it's embarrassing lol. I've been learning though
J82
Feb 3, 2015 11:15
Making a fiddle now...
J82
Feb 3, 2015 11:12
I tried making a function out of the whole thing and using this but couldn't get it to work: $(window).on('resize', functionName);
J82
Feb 3, 2015 11:09
How can I attach that to the resize event? Sorry, I ran out of the number of questions to ask.
J82
Feb 3, 2015 11:09
$('.slick-slide img').load(function() {
var imgHeight = $(this).height();
$('.slick-slide img').parents().css('height', imgHeight);
});
 

Web Developers

Room to discuss javascript and jquery, php and mysql issues. b...
J82
Feb 4, 2015 09:58
Is there a way to call "this" in a function that is originally from another function?
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
J82
Feb 3, 2015 16:24
I was trying to set a max-height on the container but it wasn't working. Isn't this how it's done usually? I've been up for so long I'm forgetting a lot of things lol
J82
Feb 3, 2015 16:21
@mikedidthis That still keeps the tall image the same height. When the slide gets to that image, the window stretches vertically creating scrollbars.
J82
Feb 3, 2015 16:16
@FrontpageExpert I've run my quota for the month lol
J82
Feb 3, 2015 16:13
Having a bit of trouble with what I thought was a simple CSS issue: goo.gl/rrnue4

The third slide is taller than the others so it stretches out the page vertically. If the image is taller, it should reduce in width until it fits the window. Can someone help me out? (You can drag the slides with your mouse to move to the next one.)
 

CSS & SVG Shapes and Designs

Here we're all about making the most out of CSS, SVG, creating...
J82
Feb 3, 2015 12:30
Ok, got it. Sorry, I just came here because @web-tiki was helping me earlier.
J82
Feb 3, 2015 12:29
I would if I could. I ran out of questions unfortunately.
J82
Feb 3, 2015 12:28
Any ideas?
J82
Feb 3, 2015 12:27
Trying to get the text to adjust with window resize but it's not working:

function adjustSlides() {
$('.slick-slide img').load(function() {
var imgHeight = $(this).height();
$('.slick-slide img').parents().css('height', imgHeight);
});
}

$(window).on('resize', function() {
adjustSlides();
});
J82
Feb 3, 2015 12:27
J82
Feb 3, 2015 12:27
I managed to get the footer text to sit right under the image with a little JS:

$('.slick-slide img').load(function() {
var imgHeight = $(this).height();
$('.slick-slide img').parents().css('height', imgHeight);
});
J82
Feb 3, 2015 09:48
I might not need to support IE8 though. I'm not sure yet. I have to ask.
J82
Feb 3, 2015 09:47
Modern browsers + IE8 if possible
J82
Feb 3, 2015 09:45
@web-tiki Was hoping I could only use CSS but oh well :)
J82
Feb 3, 2015 09:45
@web-tiki I see. I'll try doing that.
J82
Feb 3, 2015 09:43
@web-tiki Yes, the images need to be mixed portrait and landscape unfortunately
J82
Feb 3, 2015 09:40
@jbutler483 Isn't that the same as setting a width/height to .slick-slide img?
J82
Feb 3, 2015 09:34
@web-tiki Am I pretty much limited to using the same height photos or using JS?
J82
Feb 3, 2015 09:24
@web-tiki A-ha
J82
Feb 3, 2015 09:19
Yeah, I cleared it and did a hard refresh. Also when I resize the browser horizontally, the footer text stays put while the image gets smaller creating a larger gap
J82
Feb 3, 2015 09:17
@web-tiki Tried it but it's still there for me. I'm viewing it on the latest Chrome, btw. Weird.
J82
Feb 3, 2015 09:13
@web-tiki When I have developer tools active the space goes away though
J82
Feb 3, 2015 09:13
@web-tiki hmm, strange. I still see the space