CSS-Tricks / MovingBoxes

Simple horizontal slider which grows up the current box when it's in focus (image, title & text) and back down when it's not in focus.
http://css-tricks.github.io/MovingBoxes/
GNU Lesser General Public License v3.0
280 stars 147 forks source link

clicking on the panels aside from my current opens new page #67

Closed fourgood closed 12 years ago

fourgood commented 12 years ago

instead of changing the current panel when clicking the one on the left and right, it opens the link, like it should if i click the current panel. only way to get around is to change "reducedSize" from 1 to 0.999999

Mottie commented 12 years ago

Hi fourgood!

I'm not able to duplicate this issue. There is code specifically set to prevent links in the side panels from working. Maybe there is there a specific setting I'm missing?

fourgood commented 12 years ago

this is my code:

    $(function(){

        $('#slider').movingBoxes({
            /* width and panelWidth options deprecated, but still work to keep the plugin backwards compatible
            width: 980,
            panelWidth: 0.5,
            */
            wrap         : true,   // if true, the panel will "wrap" (it really rewinds/fast forwards) at the ends
            buildNav     : true,   // if true, navigation links will be added
            initAnimation: false,
            reducedSize  : 0.999999999,
            speed: 1000,
            initialized  : function(e, slider, tar){slider.options.speed = 500;},
            navFormatter : function(index, panel){ _title=panel.find('span').text();  _url=panel.find('a img').attr('src');
                return "<div class='formInfo' id='"+_title+"' title='"+_title+"'>&#9679;<span style='display: none'><img width='60' height='60' class='imag' src='"+_url+"' /><br />"+_title+"</span></div>";  }

        });

    });

i am displaying the newest wordpress posts with movingboxes (only images)

Mottie commented 12 years ago

I still can't duplicate it. Is there some other javascript attached to those links that you know of? Maybe if you shared a link to the site I could help better?

fourgood commented 12 years ago

its just the link generated by wordpress.

 <ul id="slider">

    <?php query_posts('showposts=5'); ?>                    
    <?php if (have_posts()) : $postcount = 0; ?>
    <?php while (have_posts()) : the_post(); $postcount++;?>

    <li>
        <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
            <? if (has_post_thumbnail()) { the_post_thumbnail(array( 500,500 ), array( 'class' => 'recent-thumbs' ));} ?>
        </a>
        <span><?php the_title(); ?></span>
    </li>

    <?php endwhile; ?>
    <?php endif; ?>

</ul>

can be seen on: http://kieferundkiefer.de/?page_id=8

Mottie commented 12 years ago

I just checked out the site and clicking on the side panels doesn't do anything I don't expect, at least in Chrome. Is there a specific browser that this occurs in?

fourgood commented 12 years ago

Im sorry. This is because the reducedSize is 0.999999. If i set this to 1, then it occurs.

fourgood commented 12 years ago

now i changed it to 1 - so you can see what i mean (i am using firefox 10.0.2)

Mottie commented 12 years ago

So, while on your site, I opened up my javascript console and typed in the following to change the reducedSize value to 1:

$('#slider').data('movingBoxes').options.reducedSize = 1

I then clicked on the side images and still nothing out of the ordinary happens.

fourgood commented 12 years ago

as i said i already changed it to 1 to show it to you, but now it seems that this is maybe a firefox (XP) issue?!

fourgood commented 12 years ago

ok, now ive tested it with chrome and IE too. IE shows same behaviour as firefox while chrome works as it should!

Mottie commented 12 years ago

Hmmm ok I see what you mean now... I'm not 100% sure it'll work, but I just updated the plugin to hopefully fix this issue.

In my local tests, the problem never occurred, so I'll ask you to please test it for me. Thanks!

fourgood commented 12 years ago

sorry,still the same

Mottie commented 12 years ago

Sorry =(

Could you share a link to the page with your MovingBoxes again, the last link appears to have changed content.

fourgood commented 12 years ago

yes, ive put it on maintenance mode (didnt have the rights for the pictures as it is just for testing). now it is up and running

Mottie commented 12 years ago

Hmm, it seems to work now. I just tested it in Chrome, Firefox and IE7-9 (IE9 in compatibility mode). Did you refresh the browser cache after the plugin was updated?

fourgood commented 12 years ago

did you set the reducedSize back to 1 ? because i have set it back to 0.99999999 (only way it works) -now again to 1

on 1 its still the same. ive deleted cache aswell.

Mottie commented 12 years ago

Whew, ok I'm pretty sure I've fixed the problem now. Please check it out for me crosses fingers

fourgood commented 12 years ago

you`ve done it. seems to be fixed now!

Mottie commented 12 years ago

snoopy dance YAY! I'm going to close this issue then...

Thanks for your help, and patience :)

fourgood commented 12 years ago

im sorry that i have to open this again, but ive experienced another small issue. if my current panel is the FIRST nav point (so that the last one is cloned on the left side of it) a click on that left tile opens it. the other way round works fine.

Mottie commented 12 years ago

Ugh, yet again, I can't duplicate this issue. =/

fourgood commented 12 years ago

http://kieferundkiefer.de/?page_id=8#&slider1=1

Mottie commented 12 years ago

Still in Firefox? I spammed my click button on both side panels and they worked perfectly.

fourgood commented 12 years ago

this is somehow strange. but maybe you can replicate (with firefox) by clicking 5 times on the right tile, then click the left. other way round it seems to be the same. right after looping it occurs.

zonezero commented 12 years ago

Problem is replicable, at least for me, in given URL, with Windows 7 & Opera 11.61 Right after looping effect takes place (jump from 5th to 1st slide), clicking on left slide, opens the link in current page, instead of scrolling. The same goes, for opposite direction.

Problem active in Opera 11.61 and Internet Explorer 9 (both compatibility mode on and off )

fourgood commented 12 years ago

seems that the tiles in this particular case get a wrong class appended. mb-panel cloned current <-- the "current" is wrong!

Mottie commented 12 years ago

Ok, I'm pretty sure this bug has been squashed and sent on to bug heaven.

fourgood commented 12 years ago

yes indeed. great!