27

The main goal is to keep non-refreshed the logotext <div class="small-7 medium-4 columns logo"> and the menu <nav class="pagedMenu" role="navigation">,without clipping on page refresh or while the content is loading from a page to another. Also, the menu state should be preserved from a page to another.

I've found here a possible solution that could solve the problem (you could use ajax to fetch the updated content and use jQuery to put the new content on the page and avoid the refresh entirely. Doing it that way, the existing data in the page would remain untouched. said @jfriend00)

So, I have tried to use an Ajax plugin (called AWS). In the AWS option page, I (suppose) that I've done the right thing pointing wrapper as Ajax container ID and also pagedMenu as Menu container class, Transition Effect Enabled, No ajax container IDs blank, no loader selected, having already a pulse loader implemented in the theme.

At this point, all I got it's a menu / side-menu (shiftnav) / pulse dot loader / content loading malfunction, generated perhaps by the wrong defined Ajax container id and/or menu container class(?) OR by a conflict with an existing JS / jQuery code, not so sure.

Also in Chrome console there is an error:

Uncaught SyntaxError: Unexpected token ;
(anonymous function) @ ajaxify.js?ver=4.3.1:175
n.extend.each @ jquery-2.1.4.min.js?ver=2.1.4:2
n.fn.n.each @ jquery-2.1.4.min.js?ver=2.1.4:2
$.bind.$.ajax.success @ ajaxify.js?ver=4.3.1:169
n.Callbacks.j @ jquery-2.1.4.min.js?ver=2.1.4:2
n.Callbacks.k.fireWith @ jquery-2.1.4.min.js?ver=2.1.4:2
x @ jquery-2.1.4.min.js?ver=2.1.4:4
n.ajaxTransport.k.cors.a.crossDomain.send.b @ jquery-2.1.4.min.js?ver=2.1.4:4

Everything is getting back to normal on page refresh but doesn't help at all, being useless.

I also have to mention that for the menu I've tried to keep the state using jQuery-Storage-API and storage=jQuery.sessionStorage; as you can see in mynewmenu.js file but that will not solve the non-refreshing elements problem.

The menu jsfiddle only, if this helps to have the whole picture, here thanks to @Diego Betto.

You can use this live link as example; there is a similar situation with the above described - Ajax implementation right(?) - and regarding the appearance, menu is kept non-refreshed from one page to another; if you browse Books, Works etc, menu sections you'll see; if there is a model that could be implemented here, I'll be glad to find it.

LE: meanwhile, I've tried another ajaxify solution made by @arvgta - special thanks - without success yet but as far as I've found from the Author, the defined elements should be div's with id's not classes. So, I'll try to find a way to modify somehow the code in order to have id instead on classes.

Also, I'll try to transform and implement in ajaxify.min.js file, the page-container element; jQuery('#page-container').ajaxify(); I'll come back with news.

LE2: I've tried to implement the solution using id's instead of classes but still, the pages are not loading correctly.

At this point we have ajax.min.js file updated with these lines:

(function($){

  jQuery(document).ready(function(){
    jQuery('#page-container').ajaxify({requestDelay:400,forms:false});
  });

})(jQuery); 

Also, I've modified the theme file to have id=page-container instead if class=page-container.

In these conditions, on menu click, the links are changed (like it should), menu/ logotext elements seems to working almost fine (sometimes get skippy changing position), but the content is not loading correctly in all cases; Same here, everything is getting back to normal on manual page refresh (f5), but doesn't help.

LE3: It looks like the conflict is (at least) between Revolution Slider plugin and Ajaxify.

errormessage="Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include." ;="" +="
This includes make eliminates the revolution slider libraries, and make it not work." "<="" span="">"

Site live link here. Any thoughts / alternative in this area? (not interested in using other different platforms, different WordPress themes, etc. just a workaround in this existing situation)

LE4: As far as I can see, there are many users that voted up the Jake Bown answer that could be indeed a solution; but I can't find the reason that didn't work correctly implemented into my theme (without errors) live link here The elements logotext / menu are still fading on refresh, are not kept non-refreshed. Any thoughts @Jake Bown / anyone?

LE final. Buzinas delivered the closest answer for my needs, taking in consideration my site environment (plugins installed, etc).

Cœur
  • 37,241
  • 25
  • 195
  • 267
typo_
  • 11
  • 2
  • 15
  • 37
  • Why don't you try to use http://backbonejs.org/ (or Angular/Ember) for that? Different ajax-loaders are really not the best way to create a Single Page App. – IonDen Sep 26 '15 at 08:02
  • Pretty sure if OP wanted to write it from scratch it wouldn't have use wordpress. Here using a wordpress plugin for wordpress is not that weird. – GillesC Sep 26 '15 at 08:10
  • @IonDen could be a solution, I have no idea and not because I don't accept this as alternative but reading the Blackbones page I've just opened another box full of monkeys :) I'm not a developer, nor familiar with hard coding in general, I'm just trying to put pieces together and sometimes is working. – typo_ Sep 26 '15 at 08:14
  • @typo_78, i recommend you to do it the right way from the beginning. Use Backbone, or Angular, or Ember, or even React.js. – IonDen Sep 26 '15 at 08:17
  • @IonDen Instead of wordpress or implemented in wordpress? – typo_ Sep 26 '15 at 08:17
  • @typo_78, wordpress is simply not designed to create a SPA. Only normal multi page apps. To work with SPA you will need to read about REST API, MVC, History.API and so on. Yes, this is very complex subject, but this is the only best way to create a real Single Page Apps. – IonDen Sep 26 '15 at 08:20
  • @IonDen thanks but I'll stick with wordpress for the moment, I spent last 7 months to learn wordpress and to do some stuff in this platform, I'm not going spend another good months to use another solution :) this is too much. I'm not using coding for creating sites, It's a personal project; I saw a lot of examples with wordpress acting that way I just don't know hot to make it happen :) thanks anyway – typo_ Sep 26 '15 at 08:25
  • Then you should probably start by looking for a _single page theme_ for wordpress (quite a couple of them out there) – if not for using them, then at least for seeing how the implemented this. – CBroe Sep 26 '15 at 09:30
  • folks it's not about single page theme, it's about keeping elements non-refreshed. Ajax / jQuery can do that but I didn't find yet the way to make it work ... no offence – typo_ Sep 26 '15 at 09:33
  • 2
    ajaxify tries to append scripts to the DOM which it extracts from the requested page loaded via ajax (line 175) but somehow the scripts get corrupted (`&` become `& amp;` and so on), hence the syntax error. If you don't want to do it "the right way" why don't you just contact the author of the plugin and ask for advice? – borisdiakur Sep 26 '15 at 23:30
  • Thank you for your interest; I'll open a question on the plugin forum section too, it's a good idea. By using the right way term, are you reffering to the above solution exposed by IonDen? I don't necessarily want to use this particular plugin, could be a code alternative if someone have composed and used before, achieving the same effect but in the same environment. – typo_ Sep 27 '15 at 08:39
  • @borisdiakur could you be so kind and elaborate your comment please? Right now, I have installed the other version of Ajaxify plugin but if it's necessary I can activate AWS in order to activate that error enviroment. Line 175 was in the plugin js file or somwhere into the theme? And.. what is the right way the above solution exposed by IonDen? I appreciate it – typo_ Oct 01 '15 at 12:42
  • 1
    Yes and yes, I meant line 175 in _ajaxify.js_ where the plugin appends scripts via `contentNode.appendChild(scriptNode);` and by "the right way" I was referring to IonDen's comment. Though maybe CBroe is right and there are indeed some good single page themes out there and it's worth checking them out for some inspiration. – borisdiakur Oct 01 '15 at 18:57
  • Thank you for your infos; Anyway, please take a look at this site, is not a single page and it's working like a charm with [Ajaxify](http://goo.gl/K9s3vQ). – typo_ Oct 01 '15 at 20:36
  • 1
    I think what's happening (based on looking at your source) is that your menu is loading in the content into #wrapper, but your menu in INSIDE the #wrapper so it's being reloaded as well. Try putting your menu outside of #wrapper and see where that gets you. – Patrick Lyver Oct 03 '15 at 03:45
  • 1
    You should be able to do this with an iframe. Simply make the main document ONLY have the icon or whatever and put all your content within an iframe. If you would like me to put together some code, just let me know. I can't do any demos since iframes only work on the same domains and jsfiddle and other sites don't allow iframes (as far as I know). – www139 Oct 03 '15 at 05:59
  • @www139 thank you as well for your interest; iframe could work with wordpress / wordpress plugins like revolution slider/ visual composer as far as you know? – typo_ Oct 03 '15 at 11:16
  • @Patrick Lyver almost there. It could be a place to start because the logotext remain in place like it should, but the menu as [we can see](http://goo.gl/xGBMtI) is scrambled, the menu-pagination doesn't work in this shape. Also the content (rev sliders, etc) is not loading properly ...Tested with both above mentioned Ajaxify plugins; Any thoughts? – typo_ Oct 03 '15 at 11:22
  • @Patrick Lyver My concern is related to this error message found in Chrome Console/ Elements `"Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include." ;="" +="
    This includes make eliminates the revolution slider libraries, and make it not work." "<="" span="">"`
    – typo_ Oct 03 '15 at 11:30
  • @typo_78 did you try disabling the Revolution Slider plugin to see if your issue gets fixed? Not saying that is the solution, but it will give you more information as to where your error is located. If disabling the Revolution slider fixes the problem, then you need to reorganize the way your JS loads. – Patrick Lyver Oct 03 '15 at 13:01
  • @typo_78 I haven't used wordpress yet since I code pretty much anything but I use iframes this way all the time. It is a great way to add an accurate loader as well. I don't know if you are able to do it since it appears as though you are using wordpress for this? Really I think that you have only two options -- some really complicated AJAX or an iframe. With many requests, AJAX is slow and I wouldn't use it. AJAX in general is slower than actually "loading" everything in. – www139 Oct 03 '15 at 14:16
  • oh as far as I understand your option exclude wordpress right? – typo_ Oct 03 '15 at 14:32
  • @typo_78: see my answer and let me know.... – Luca Filosofi Oct 03 '15 at 22:13
  • @typo_78: i'm sorry that i couldn't help yesterday but i was not at home... BTW i have updated my answer again, this time i have tested it personally. so i'm sure that it will work. let me know. – Luca Filosofi Oct 05 '15 at 14:57
  • @aSeptik, no problem, I was under the bounty deadline preassure; I'll try that in a few and come back with some news. Thank you, – typo_ Oct 05 '15 at 15:36
  • @typo_78: i have got it! ;-) i'm preparing a live demo stay tuned... – Luca Filosofi Oct 06 '15 at 11:54
  • @aSeptik sounds great http://chat.stackoverflow.com/rooms/91409/going-ajaxed-with-wordpress – typo_ Oct 06 '15 at 15:37

3 Answers3

6

From what you said I think I might have found the solution you're looking for - you want to load content dynamically whilst keeping the logo and navigation untouched? If so, this might be what you're looking for.

In the example, the pages are loaded in from a div within the page but could be used to load another URL or file:

$('.viewport ul li a').on('click', function(e) {
   e.preventDefault();
   var link = this.hash.substring(1, this.hash.length);
   if($('.'+link).length) {
     $('.viewport span.body').html($('.'+link).html());
   }
});
Luca Filosofi
  • 30,905
  • 9
  • 70
  • 77
Jake Bown
  • 411
  • 4
  • 11
  • thank you for your answer, It might be a good solution but I can't see how can be applied on my menu. As far as we can see, my menu already have implemented a jQuery sequence that preserve the state from a page to another ... How can I combine this with your solution? Could you be so kind and use as base [this jsfiddle](http://jsfiddle.net/ex3ntia/hrt2s221/7/) please? I appreciate it – typo_ Sep 28 '15 at 15:33
  • 1
    Do you need it to load data from another page or from within the current page? Here's the code implemented into yours http://codepen.io/jakebown/pen/WQoaPX – Jake Bown Sep 28 '15 at 15:48
  • thank you, Each page have it's own content; your code will load the content within the current page? – typo_ Sep 28 '15 at 15:51
  • Yes, currently, if you goto the bottom of the HTML pane in CodePen, you will see the pages `page page-1` and your links have `#page-1` which loads that content in. I will send a link to it loading dynamic pages. – Jake Bown Sep 28 '15 at 15:52
  • Sorry, right now I am so confused :) how can I use it then, having each page with his own content, removing that lines from the bottom of the page or... (?!) – typo_ Sep 28 '15 at 15:59
  • This version gets the contents of a URL, it doesn't work in Codepen due to cross browser restrictions but you could replace `http://www.stackoverflow.com` url for a page in your own site, that would work [codepen](http://codepen.io/jakebown/pen/WQoaPX) link. – Jake Bown Sep 28 '15 at 16:00
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/90815/discussion-between-typo-78-and-jake-bown). – typo_ Sep 28 '15 at 16:02
  • Look I've figured out to implement your code in this file jbown.js but unfortunately, the elements are still fading on refresh ... there are no errors in the console can someone have a look please? [live link](http://goo.gl/Rgr55v) what's wrong ?!! – typo_ Oct 03 '15 at 19:53
  • @aSeptik do you have any idea how to implement this in WordPress please? – typo_ Oct 03 '15 at 21:18
  • @aSeptik I got it thanks; is there any possibility to have a complete answer when u'll be able to type properly? – typo_ Oct 03 '15 at 21:55
5

TL;DR

I've created a plunker for you, take a look, and play with it as long as you can. You'll learn a lot from it!


I think you're trying too many things here, but didn't try the simplest:

The main goal is to keep non-refreshed the logotext and the menu ,without clipping on page refresh or while the content is loading from a page to another. Also the menu state should be preserved from a page to another.

If you want to do that, there are a few steps:

  • Create a 'master' page, that we're going to call index.html from now on.
  • So, our index must have the static part of our page, e.g menu, logo, footer etc.
  • Then, our 'subpages' must be cut down (no html, head, body, script, style tags, only the content that should be showed into our master page).
  • That done, now we must change our links to use AJAX instead of doing full refresh:

    /* we add a 'click' event handler to our menu */
    document.getElementById('menu-menu-2').addEventListener('click', function(e) {
      var el = e.target;
    
      /* then, we see if the element that was clicked is a anchor */
      if (el.tagName === 'A') {
        /* we prevent the default functionality of the anchor (i.e redirect to the page) */
        e.preventDefault();
        /* we show our spinner, so the user can see that something is loading */
        spinner.classList.remove('hidden');
    
        /* and we call our AJAX function, passing a function as the callback */
        ajax(el.href, function(xhr) {
          /* we get our main div, and we replace its HTML to the response that came
             from the AJAX request */
          document.getElementById('main').innerHTML = xhr.responseText;
          /* since the request was finished, we hide our spinner again */
          spinner.classList.add('hidden');
        });
      }
    });
    
  • Ok, now our pages are already working via AJAX, and not reloading our static content.


But now, we see that we have some issues. For example, if someone tries to open one of our pages directly via URL, he'll see unstyled page, without the menu/logo etc. So, what should we do?

We have a few more steps now:

  • Simulate that our links are effectively transfering between pages using the History API:

    /* inside our ajax callback, we save the fake-redirect we made into the pushState */
    ajax(el.href, function(xhr) {
      document.getElementById('main').innerHTML = xhr.responseText;
    
      /* save the new html, so when the user uses the back button, we can load it again */
      history.pushState({
        html: main.innerHTML,
        title: el.textContent + '| neuegrid'
      }, '', el.href);
    
      /* (...) */
    });
    
    /* and outside it, we add a 'popstate' event handler */
    window.addEventListener('popstate', function(e) {
      /* so, if we've saved the state before, we can restore it now */
      if (e.state) {
        document.getElementById('main').innerHTML = e.state.html;
        document.title = e.state.title;
      }
    });
    
  • And we need that when the user enters directly to another page, e.g about-us, we redirect him to the index.html, and then load the about-us page from there.

  • So we create a redirect.js file, and we reference it in all of our subpages:

    /* save the page that the user tried to load into the sessionStorage */
    sessionStorage.setItem('page', location.pathname);
    /* and them, we redirect him to our main page */
    location.replace('/');
    
  • And then, in our index.html page, we see if there is any page in the sessionStorage, and we load it, if there is, otherwise we load our home page.

    var page = sessionStorage.getItem('page') || 'home';
    /* we look into the menu items, and find which has an href attribute 
       ending with the page's URL we wanna load */
    document.querySelector('#menu-menu-2 > li > a[href$="' + page + '"').click();
    

And that's it, we're done now. Take a look at the plunker I've been making to you.

And play with it as long as you can, so you'll learn a lot from it.

I hope I could help you! :)


Note: Just for reference, this is our ajax function:

function ajax(url, callback, method, params) {
  if (!method) method = 'GET';

  var xhr = new XMLHttpRequest();
  xhr.open(method, url);

  if (callback) xhr.addEventListener('load', function() {
    callback.call(this, xhr);
  });

  if (params) {
    params = Object.keys(params).map(function(key) {
      return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
    }).join('&');
    xhr.send(params);
  } else {
    xhr.send();
  }
}
Buzinas
  • 11,597
  • 2
  • 36
  • 58
  • First of all thank you for your feed-back. The main problem is that we have a dynamic menu (exposed here http://jsfiddle.net/ex3ntia/hrt2s221/7 ) also mentioned above. The menu links are generated in wordpress not manually. In your plunker, the menu is static, the links I think that should be pointed manually. Any thoughts about this? – typo_ Oct 03 '15 at 11:04
  • @typo_78 the menu being dynamic doesn't matter at all for this solution. What is the problem you're facing here? – Buzinas Oct 03 '15 at 12:49
  • As far as I can see your above model looks like a splash-page approach is that right? The problem is that I can't see how can I implement first the dynamic menu links into the static page :) – typo_ Oct 03 '15 at 12:50
  • @typo_78 how do you implement them in the dynamic one? ;) – Buzinas Oct 03 '15 at 12:55
  • There is a code in header.php that pick up the links according to the wordpress menu section – typo_ Oct 03 '15 at 12:57
  • @typo Right, that's completely fine, what's the problem? – Buzinas Oct 03 '15 at 12:57
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/91241/discussion-between-typo-78-and-buzinas). – typo_ Oct 03 '15 at 12:59
  • Work in progress but pretty close to the desired result. thanks to @Buzinas; I'll come back with news. – typo_ Oct 03 '15 at 16:46
2

GOING AJAXED WITH WORDPRESS

follow these simple steps (let's take as example theme "twentyfifteen" on the WP templates folder):

  1. edit single.php, page.php, index.php and all other pages having get_header() and get_footer() functions and replace it respectively with below code:

NOTE: this is important because if someone (ex: search-engine) reach your pages directly from the link, it is still fully available and 100% working. (useful for SEO)


<?php 
//get_header()
if(!isset($_REQUEST['ajax'])){
  get_header();
}
?>

<!-- other code --->

<?php
//get_footer()
if(!isset($_REQUEST['ajax'])){
  get_footer();
}
?>
  1. open the header.php add the below code inside the <head> section at the very end

    <script>
!(function($) {
    $(function() {
        $('.menu-item a, .widget-area a, .page_item a').on('click', function(e) {
            e.preventDefault();
            var href = this.href;
            var query = href ? (href + (!/\?/g.test(href) ? '?' : '&') + 'ajax=1') : window.location;

            /* IMPLEMENT SOME LOGIG HERE BEFORE PAGE LOAD */
            /* ex: kill instance of running plugins */

            $('#content').hide().empty().load(query, function() {

                /* IMPLEMENT SOME LOGIG HERE AFTER PAGE IS LOADED */
                /* ex: refresh or run a new plugin instance for this page */

                jQuery(this).show();
            });
        });
    });
})(jQuery);
    </script>
  1. in the header.php file put the code below at the end of the file, 90% of times you need it under the navigation. In this case we already have this on the "twentyfifteen" theme.

    NB: most probably you have the opening tag <div id="content" class="site-content"> inside the header.php file and the closing tag </div> on the footer.php file, this doesn't matter, you can leave it as is.


<div id="content"></div>
  • NOTE: consider this a proof of concept; it may work as is, but you still need to tailor it to suit your needs; you may need to:

    1. Add a menu (in case it is not already set) by going under Appeareace > Menus > [check Primary Menu] > Save Menu in order to activate the menu. it's tested and working.
    2. You may want to add some other class to the jQuery function like .widget-area a in order to ajax also widget links.
    3. if you are using 3d party plugins you may need to ensure that all dependencies of each plugin are loaded also on the main page from where you want everything is displayed without refreshing content.
    4. you may need to check and kill those 3d party plugin before a new page load and run or refresh plugin needed in the loaded page.
Luca Filosofi
  • 30,905
  • 9
  • 70
  • 77
  • to recap: the main goal is to keep these 2 elements non-refreshed (logotext and the menu) while the rest of the content is loading on refresh, using the same structure with the pulse loader, etc. So I've edited the _page.php_ and _single.php_ as you described above (step1), replaced in your _js_ file _#ajax-content_ with _page-container_ but for posts I don't have any _id_ only classes (step 2) ... Any thoughts, how can I proceed please? [link here](http://goo.gl/xGBMtI) Thanks – typo_ Oct 04 '15 at 13:38
  • Unfortunately, the same story. Thank you anyway for your answer and interest. – typo_ Oct 04 '15 at 20:35
  • [this is](http://goo.gl/xGBMtI) what I've got, the content is messing around big time unfortunately; I'm not telling that ur code is not good but in my site environment doesn't work because there are some plugins like rev slider / visual composer that it looks like doesn't work "as is" with any ajaxify solution ... kind of tricky I know. – typo_ Oct 05 '15 at 17:04
  • @typo_78: let's continue this discussion on chat... http://chat.stackoverflow.com/rooms/91409/going-ajaxed-with-wordpress – Luca Filosofi Oct 05 '15 at 17:11
  • did you figured it out? I've opened a new [question here](http://stackoverflow.com/q/33087632/4642215) regarding the rev slider / visual composer ajaxify implementation if you are still interested; – typo_ Oct 17 '15 at 09:36
  • hi dude, yes I have figured out how to do it, the problem is that rev slider is bugged (I have also commented on code canyon about bugs I have fiund) you have to modify a little the source code. – Luca Filosofi Oct 17 '15 at 09:39
  • I got it, I've found your post there written 3 days ago :) I suppose that we have to wait for the next update version (?) If you still want to share and formulate an answer, I'll be glad to find it. Anyway, that's odd because in Visual composer, parallax elements behaviour in ajax nviroment it's the same, also buggy(?!). – typo_ Oct 17 '15 at 09:55
  • visual composer is not a problem, Rev slider is different, cause when you load a new page with slider you need to kill the previous running slider, well, the function to kill is bugged! – Luca Filosofi Oct 17 '15 at 10:17
  • anyway I have made a demo for you few time ago. I have to upload it, if you are interested in some mod. – Luca Filosofi Oct 17 '15 at 10:19
  • Sure, I am interested. If you have a few moments, I can try it – typo_ Oct 17 '15 at 10:25
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/92567/discussion-between-typo-78-and-aseptik). – typo_ Oct 17 '15 at 10:26
  • Sure not a problem. Take ur time :) Thanks – typo_ Oct 17 '15 at 10:30
  • @typo_78: demo can be found here: http://so.devilmaycode.it/how-to-keep-elements-non-refreshed/ – Luca Filosofi Oct 17 '15 at 14:30
  • wow it works flawless! can you please keep the link functional for a few days? I'll try to see if there is a possibility to implement ur solution as soon as I have time. I appreciate it. – typo_ Oct 17 '15 at 14:51
  • @typo_78: i have done it with very minimal changes so that you don't need to warry about plugin updates; the link will remain active. don't worry. – Luca Filosofi Oct 17 '15 at 14:57
  • hey there are you around? I don't think that I _can't_ handle this .. unfortunately. I'm not able to fill this instructions (/* IMPLEMENT SOME LOGIG HERE BEFORE PAGE LOAD */ /* ex: kill instance of running plugins */ /* IMPLEMENT SOME LOGIG HERE AFTER PAGE IS LOADED */ /* ex: refresh or run a new plugin instance for this page */) Do you have a moment, can we chat/ can you have a look please? Thanks – typo_ Oct 20 '15 at 17:05
  • hey Bro can we do this tomorrow? don't wary that instructions are for general use only. the code you need is in my demo source code, plus as I mentioned before, you need a modified version of two revslider js files. – Luca Filosofi Oct 20 '15 at 17:22
  • Bona sera, I capito! :) I'll try first to use your script code as is(?) to see how it works and I'll let you know. Sure, when u'll be available. – typo_ Oct 20 '15 at 17:26
  • nope, I can't achieve the result. I'll show you tomorrow what I've done if you have a few moments. Thanks – typo_ Oct 20 '15 at 18:14
  • there is a js file that you can't see because revslider is loading it in deferred mode...wait tomorrow. – Luca Filosofi Oct 20 '15 at 18:16
  • I see; ok then, I'll be waiting patiently :) – typo_ Oct 20 '15 at 18:17
  • sorry I'm not at home now! see you tomorrow! ;-) – Luca Filosofi Oct 20 '15 at 18:21
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/93010/discussion-between-typo-78-and-aseptik). – typo_ Oct 21 '15 at 20:52
  • hey there are you around? I'm ready when you are, if you have a few moments ... thanks – typo_ Nov 06 '15 at 17:57