Here's a
jsfiddle so you can see it in action.
Here's what I tried:
- $('.sl-wrapper').each(function(index) {
- var initwd1 = $(this).children('.sl-w1').width();
- var shadwd1 = 8 + 3;
- console.log('Init Width' + index + ': ' + initwd1);
- if (initwd1 <= shadwd1) { // looking to see if width is equal to or less than shadow & blur
- var fixwd1 = initwd1 + 5
- console.log('Width Fix on: ' + index + ' - ' + fixwd1);
- $(this).children('.sl-w1').css({'width': fixwd1 + 'px'}); // incr. the width
- if ($(this).next('.sl-wrapper').length != 0) { //check to make sure there's a following elem.
- $(this).next('.sl-wrapper').css({'margin-left': -5 + 'px'}); // adjust left margin to account for width incr
- console.log('Margin Fix on: ' + indexnext);
- }
- }
- });
- });
In the css, I've assigned overflow-visible to the parent ".sl-wrapper", but it still refuses to show the shadow.
Noticed when I bring up console, then it shows fine - wondering if there's a way to get this to happen through some kind of callout - not really sure. Thanks, Bill