Mottie
Forum Replies Created
-
Hmm, well now the link isn’t associated with the slider at all. Maybe the next best solution would be to add the code, but link to the video id instead of a specific slide?
jQuery('a[href*="#video"]').click(function(){ jQuery('.anythingBase').anythingSlider( this.hash ); });The reason I didn’t do this in the first place was because of the HTML. Now with the code above, you can make links to multiple videos, all of which will need a wrapper with an id that matches the href:
<a href="#video1">First video</a> <a href="#video-two">Second video</a> <a href="#video99">Better than video 98</a>@spencermerpi: I think I answered your question in another thread… basically set the
hashTagsoption tofalse@carolineelisa: The slider will scale to fit inside of it’s container if you set the
expandfunction totrue. See this demo.Swipe navigation for iPhones/iPads can be added by including some extra scripting; this code needs to be added BEFORE the AnythingSlider initialization code – demo
jQuery(function($) { /****************************************** Swipe Demo - without using jQuery Mobile ******************************************/ // Called when the plugin finished initializing $('#slider').bind('initialized', function(e, slider) { var time = 1000, // allow movement if < 1000 ms (1 sec) range = 50, // swipe movement of 50 pixels triggers the slider x = 0, t = 0, touch = "ontouchend" in document, st = (touch) ? 'touchstart' : 'mousedown', mv = (touch) ? 'touchmove' : 'mousemove', en = (touch) ? 'touchend' : 'mouseup'; slider.$window.add(slider.$controls).bind(st, function(e) { // prevent image drag (Firefox) e.preventDefault(); t = (new Date()).getTime(); x = e.originalEvent.touches ? e.originalEvent.touches[0].pageX : e.pageX; }).bind(en, function(e) { t = 0; x = 0; }).bind(mv, function(e) { e.preventDefault(); var newx = e.originalEvent.touches ? e.originalEvent.touches[0].pageX : e.pageX, r = (x === 0) ? 0 : Math.abs(newx - x), // allow if movement < 1 sec ct = (new Date()).getTime(); if (t !== 0 && ct - t < time && r > range) { if (newx < x) { if ($(this).hasClass('anythingControls')) { slider.$controls.find('.next').trigger('click'); } else { slider.goForward(); } return false; } if (newx > x) { if ($(this).hasClass('anythingControls')) { slider.$controls.find('.prev').trigger('click'); } else { slider.goBack(); } } t = 0; x = 0; return false; } }); }); });Hi CarolineElisa!
It seems to work for me: http://www.storybox.co.nz/2012/test-project/#video
Edit: Oh duh, you meant the link on the page. Just add this bit of code:
jQuery('a[href*="#video"]').click(function(){ jQuery('.anythingBase').anythingSlider(4); });It doesn’t use
#videobecause the video extension replaces the id of the video on the iframe. So either target slide 4 or the id or class name of the element wrapping the iframe.Hi Garth!
It looks like this bit of css is the culprit:
#content ul { padding-left: 25px; }if you remove the ID (#content) from in front of the ul it will make that css less specific and then it shouldn’t interfere with the slider.
Rob
I was curious as to why the last three links go to slides 4, 5 and 6 in the third tab instead of 1, 2 and 3 since it is a completely new tab and a new slider. Was that intentional?
Maybe try this for the last three links:
jQuery("#words_create").click(function(e) { setTab(3, 1); e.preventDefault(); }); jQuery("#words_check").click(function(e) { setTab(3, 2); e.preventDefault(); }); jQuery("#words_proofread").click(function(e) { setTab(3, 3); e.preventDefault(); });Hi Jinch!
Try this code… and I made a basic demo of it in action here
jQuery("document").ready(function() { var setTab = function(tab, slide) { tab = "#tabs-" + tab; jQuery('#tabs').tabs("select", tab); jQuery(tab + ' .anythingBase').anythingSlider(slide); }; jQuery("#tabs").tabs(); jQuery("#web_review").click(function(e) { setTab(2, 1); e.preventDefault(); }); jQuery("#web_test").click(function(e) { setTab(2, 2); e.preventDefault(); }); jQuery("#web_design").click(function(e) { setTab(2, 3); e.preventDefault(); }); jQuery("#words_create").click(function(e) { setTab(3, 4); e.preventDefault(); }); jQuery("#words_check").click(function(e) { setTab(3, 5); e.preventDefault(); }); jQuery("#words_proofread").click(function(e) { setTab(3, 6); e.preventDefault(); }); });Hi spencermerpi!
I’m not sure how to do this in WordPress, so maybe Jacob can help on that aspect of it, but you can add an ID to the slide and target that instead… also, it might be best to turn off the
hashTagsoption.<li id="myfirstli> <div id="myfirstdiv"> some content </div> </li>and target it using: http://www.example.com#myfirstli or http://www.example.com#myfirstdiv, either will work, so pick one.
Forum: Plugins
In reply to: [Plugin: AnythingSlider] Documentation etc and more etcHi Paal!
I think Jacob has that request to make it a feature slider, but I’m clueless about WordPress, so I’ll divert that question to him.
I was planning on helping Jacob with the WP plugin, at least some of the javascript part ;), so I’ll look into adding some theme popups, or something… I’m still working on learning php.
As for themes, maybe this post will answer it for you? I have a bunch of new themes over here.
It looks like Flexslider is pretty similar. There are lots of sliders out there, you just have to find the one you like 🙂
The video extension doesn’t check for that so don’t set the videos to autoplay. I plan to completely rewrite the video extension, not sure when I’ll start, but I’ll be sure to check for that option and remove it.
Forum: Plugins
In reply to: [Plugin: AnythingSlider for WordPress] Won't play?I’ll have to let Jacob answer this one properly, but have you tried wrapping the entire slider then targeting that instead? Something like:
<div id="slider-wrapper"> <ul> <!-- slider ul with differing ID's --> ... </ul> </div>Then use this css:
#slider-wrapper ul { height: 200px; width: 300px; overflow-y: auto; overflow-x: hidden }Hiya!
I answered your question over on CSS-Tricks. I hope that helps!
I guess I’m confused. Why can’t you just style the iframe using css?
Forum: Plugins
In reply to: [Plugin: AnythingSlider for WordPress] Won't play?Hi Petroica!
The unstyled flickering is called “flash of unstyled content” or fouc. A method to prevent this was added to the plugin in version 1.7.11.5, and the details are mentioned in the FAQ.
So, honestly, I’m not sure why you would be seeing fouc unless there was some other bit of css on the page over-riding it. This is the css from the FAQ, please make sure it is still in tact.
#slider { height: 200px; width: 300px; overflow-y: auto; overflow-x: hidden }Forum: Plugins
In reply to: [Plugin: AnythingSlider for WordPress] Slider skipping slidesYAY welcome to the dolt club! I’m a proud and long-standing member, here’s your certificate and a button 😛
LOL, I’m glad it’s all fixed now 🙂
Forum: Plugins
In reply to: [Plugin: AnythingSlider for WordPress] Slider skipping slidesAhh ok, the HTML is all compressed so it made it difficult to see the problem. But once I formatted it I see the first two panels have iframes without a closing
</iframe>which I bet is why the first two slides aren’t showing up.Once those two slides are fixed, the navigation titles should match properly, I think.