Home › Forums › JavaScript › Anything Slider not sliding with embedded iframes.
- This topic is empty.
-
AuthorPosts
-
October 10, 2011 at 8:57 am #34708tblancoMember
I am using the great anything slider because it should slide anything.
In the site i’m making, i want embedded Vimeo video’s in iframes. If the (auto) slider comes across one of those, it stops sliding and the navigation is disabled (although the video is playable).
If i use the ‘vimeo old embedded methode’ it works perfectly, but then the videos are not good for ipad and such.
Anybody a solution?
thanksOctober 10, 2011 at 9:14 am #88789MottieMemberHi tblanco!
Sadly, that is a known problem with iframe videos (YouTube also) on the iPad. There is one solution, but it requires hiding the iframe video when it isn’t in view. But doing this will reset the position of the video so when it comes back into view, it will restart from the beginning.
October 11, 2011 at 4:09 am #88859donitatravis101MemberHello :)
I am also experiencing the same problem. Is there anything to fix it out? But I am going to try Mottie’s advice. Thanks! :)real estate solutions
solutions real estate
short sale processOctober 11, 2011 at 4:52 am #88860tblancoMemberthanks Mottie
‘restarting the video’ is no problem for me, since it is not playing automatically and has either been seen or not, in my opinion.
So how do i hide ‘the iframe video when it isn’t in view’?October 11, 2011 at 7:05 am #88867tblancoMemberHere i found :
$('#slider').anythingSlider({
// Callback when the plugin finished initializing
onInitialized: function(e, slider) {
slider.$items.not( slider.$currentPage ).find('iframe,video').fadeOut();
},
// Callback before slide animates
onSlideBegin: function(e, slider) {
slider.$currentPage.find('iframe,video').fadeOut(slider.animationTime);
},
// Callback when slide completes - no event variable!
onSlideComplete: function(slider) {
slider.$targetPage.find('iframe,video').fadeIn(slider.animationTime);
},
});but this doesn’t seem to help when i put this script under the slider in the html/php.
Is this what you mean?
If yes, where is the right place to put the script?October 11, 2011 at 9:24 am #88874MottieMemberHi tblanco!
Try this version with slightly modified code. Note the added css for “.inner”.
The code should be included with your other AnythingSlider initialization options. If you need help with that, please your AnythingSlider code.
October 12, 2011 at 4:30 am #88935tblancoMemberYes this works!
Works in wordpress, without the wordpressanythingsliderplugin (needed to show existing categories), with the viper plugin (video).
Great! Thank you Mottie!October 12, 2011 at 4:31 am #88936tblancoMemberWhere is the ‘solved’ button here
October 12, 2011 at 11:55 am #88961MottieMemberSweet! Glad something is finally working! :)
To make a thread solved, edit the first post and check solved there.
October 13, 2011 at 9:49 am #89019tblancoMemberOne thing about the use in wordpress: 1st slide has to be without a (iframe)video, otherwise slider gets stuck again,…strange….
This might be a wordpress thing though.October 13, 2011 at 10:03 am #89020MottieMemberOctober 14, 2011 at 6:02 am #89047tblancoMemberDemo works, yes. I am using jquery-latest.
Now everything seems to work with just
I don’t get it. Have to double check. Must’ve done s.th wrong before.
At least it works, that’s the most important…At the demo page i saw there’s some sliding problems in IE7?
Or is this a problem with the iframes vs. IE7?(i cannot check IE)October 14, 2011 at 11:32 am #89068MottieMemberIt seems to work just fine when I test it on IE9 in IE7 compatibility mode.
Honestly, I’ve really stopped caring about IE8 and older – I know bad attitude, but seriously if a company can’t upgrade from an older IE because of internal software, at least let your employees have access to a FREE modern browser.
October 17, 2011 at 4:35 am #89122tblancoMemberI totally agree on that.The guy i make this thing for disagrees.
So, good to hear it works.So, my final solution, thanks to mottie, to show posts of a single categorie in wordpress, with the anythingslider (not the wp plugin):
$args = array(
'paged' => get_query_var('paged'),
'posts_per_page' => 8,
'category__in' => array(36),
'post_type' => 'post',
'orderby' => 'date',
'post_status' => 'publish',
'max_num_pages' => -1
);
query_posts($args);
$postslist = get_posts( $args );
foreach ($postslist as $post) : setup_postdata($post); ?>
with
which shows the last 8 posts of category 36 in the slider, with a link to each post.
Thanks again mottie! -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.