savohij
Forum Replies Created
-
Forum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderThat’s a strange one, yes indeed.
Well, there’s always a way, I guess. I’ll try to go without async at desktop view and just turn off the jQuery at mobile meanwhile.
Thanks for trying to help, fabiorino 🙂Forum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderI install the .8.2 and tested it with the default theme and without any other third part plugins too. The same story. You can try it for your self btw.
Wired story, huh 🙂Forum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderI gotta tell you, I barely “know” JS/JQuery, so not sure at all if it’s about setInterval() or not – just tried to solved this as best as I could.
Did you test the async loading with other scripts on Firefox?
Not really, no. You mean to see if other plugins(with jquery) works ok with async scripting at my site? If so, just tell me what plugin I should install 🙂
But, I tied this: I disabled one by one scripts(from async to normal – including crellyslider.min.js) and found out that only async for jquery.js?ver=1.11.3 makes this to happen(cause this odd bug), while disabling async to all the other scripts(again, including the jquery.crellyslider.min.js?ver=1.1.1) has no obvious influence on this kind of strange behavior of the slider.
I’ll reinstall the script, but doubt it will help thoForum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderForgot to mention: no errors in the console.
Forum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderIt’s not really important, but somehow I got frontend.php with lots of empty lines(not huge, but there’s a difference in between the original).
As for the firefox: I of course checked it with empty cache. Also, I tried it with fresh version of the pre-installed themes – works the same. Also I played around, but nothing really helped. However there’s two things I think I should mention:
1) This is what I’m getting without hitting the local link to the same page: Image
2) I found this link while searching for solution and playing around with it: http://forum.jquery.com/topic/setinterval-not-working-in-firefox
So I tried this updated code:$output .= '<script type="text/javascript">' . "\n"; $output .= 'var fileInterval' . $slider_id . ' = setInterval(function() { if(jQuery.fn.crellySlider) {' . "\n"; $output .= '(function($) {' . "\n"; $output .= '$(document).ready(function() {' . "\n"; $output .= 'var d = new Date()' . "\n"; $output .= 'd.getTime()' . "\n"; $output .= '$("#crellyslider-' . $slider_id . '").crellySlider({' . "\n"; $output .= 'layout: \'' . $slider->layout . '\',' . "\n"; $output .= 'responsive: ' . $slider->responsive . ',' . "\n"; $output .= 'startWidth: ' . $slider->startWidth . ',' . "\n"; $output .= 'startHeight: ' . $slider->startHeight . ',' . "\n"; $output .= 'automaticSlide: ' . $slider->automaticSlide . ',' . "\n"; $output .= 'showControls: ' . $slider->showControls . ',' . "\n"; $output .= 'showNavigation: ' . $slider->showNavigation . ',' . "\n"; $output .= 'enableSwipe: ' . $slider->enableSwipe . ',' . "\n"; $output .= 'showProgressBar: ' . $slider->showProgressBar . ',' . "\n"; $output .= 'pauseOnHover: ' . $slider->pauseOnHover . ',' . "\n"; $output .= stripslashes($slider->callbacks) . "\n"; $output .= '});' . "\n"; $output .= '});' . "\n"; $output .= '})(jQuery);' . "\n"; $output .= 'clearInterval(fileInterval' . $slider_id . ');' . "\n"; $output .= '}},1000);' . "\n"; $output .= '</script>' . "\n";But this didn’t help, unfortunately. Perhaps I just didn’t use it right or something.
Forum: Plugins
In reply to: [Crelly Slider] Async JQuery brakes CrellySliderI don’t know why, but I don’t have this code in this lines. From 161 to 179 on my server I have some totally different code(I got latest version of CrellySlider). I also went to github(https://github.com/fabiorino/crelly-slider/blob/master/wordpress/frontend.php) and check it there, just in case, there’s also some different code in this lines. But I found it on my local between lines 431-467. And this is the code:
$output .= ‘<script type=”text/javascript”>’ . “\n”;$output .= ‘(function($) {‘ . “\n”;
$output .= ‘$(document).ready(function() {‘ . “\n”;
$output .= ‘$(“#crellyslider-‘ . $slider_id . ‘”).crellySlider({‘ . “\n”;
$output .= ‘layout: \” . $slider->layout . ‘\’,’ . “\n”;
$output .= ‘responsive: ‘ . $slider->responsive . ‘,’ . “\n”;
$output .= ‘startWidth: ‘ . $slider->startWidth . ‘,’ . “\n”;
$output .= ‘startHeight: ‘ . $slider->startHeight . ‘,’ . “\n”;
$output .= ‘automaticSlide: ‘ . $slider->automaticSlide . ‘,’ . “\n”;
$output .= ‘showControls: ‘ . $slider->showControls . ‘,’ . “\n”;
$output .= ‘showNavigation: ‘ . $slider->showNavigation . ‘,’ . “\n”;
$output .= ‘enableSwipe: ‘ . $slider->enableSwipe . ‘,’ . “\n”;
$output .= ‘showProgressBar: ‘ . $slider->showProgressBar . ‘,’ . “\n”;
$output .= ‘pauseOnHover: ‘ . $slider->pauseOnHover . ‘,’ . “\n”;
$output .= stripslashes($slider->callbacks) . “\n”;
$output .= ‘});’ . “\n”;
$output .= ‘});’ . “\n”;
$output .= ‘})(jQuery);’ . “\n”;
$output .= ‘</script>’ . “\n”;`
But that’s alright. The thing is, it doesn’t work in FF(IE edge and 10, chrome, opera – works great).
But in FF this is what happens:
When I open the page with the slider, it doesn’t load. No matter how much I refresh the page. BUT! If I click on the link to this same page(I clicked on the logo instead of refreshing by accident) and this time slider did load normally! I tried again and again and this works this way. But only this way. It doesn’t fire if I simply load the page or opening normally. Any idea of why this could happen? I tried also change the delay time from 100 to 1000, to see if it helps, but its not.Forum: Plugins
In reply to: [Crelly Slider] Adaptation for mobileI was wrong! This method is working! If the JS loading normally it would work… well… normally too 🙂
So, the performance issue is solved! This was THE problem.
Thanks a-lot, fabiorino, for your invaluable help and support! 🙂Forum: Plugins
In reply to: [Crelly Slider] Adaptation for mobileI actually tried this my self, but with a little bit more of code(with connection to css
display:noneof the element and eventListener on the resize). But there’s two problems with this:
1) (the main problem) – It still load the images… I think this is happens because JS loaded a little bit after, but I’m not sure. Anyway, this isn’t working.
2) I don’t know how to resize back with the slider on(something like:jQuery('.crellyslider-slider-desktop_version').undoTheRemove();). Silly, I know 🙂 But this would finish the job, I think.Forum: Plugins
In reply to: [Crelly Slider] Adaptation for mobileI see… That’s not what I meant 🙂
I know the container can get thedisplay: nonewithout any problem. The problem however is not this.
The problem is, if the container gets thedisplay: none, the images of the slider still downloaded, and whole of thisdisplay:nonething is made to stop them from download, because this images impact the weight of the mobile-site version.So… What is needed to be done is, to disable somehow the images of the slider, layers it contains and DOM from automatic changes(no need for this if there’s no slider, but I’m not sure how seriously this if we talking about the speed of the page).
Forum: Plugins
In reply to: [Crelly Slider] Adaptation for mobileI did lots of things in order to try, but as for about the
display: none !important;I did and try this:I put the slider into the container(id –
#container) – it’s not shown on the screenshot;
The id of the slider is –#crellyslider-2;
Now, in my css I did this:@media (max-width:600px){ #container, #crellyslider-2, #crellyslider-2 ul li { display: none !important; } }And that didn’t work, unfortunately.
P.S. the site isn’t on the air yet
Forum: Plugins
In reply to: [Crelly Slider] Adaptation for mobileYes, fabiorino. Tried that too.
The thing is, the slider is using the inner styles(style=”…”) inside of it, and also change it every time in the DOM it self. So nothing helps(as I tried) from the external css file(styles.css).