Before you ask please READ THIS

Music problem

Hello,
I put the background music but when I change the page the song it starts from the beginning.
Why?

This is the site
http://www.antoniogiovefotografo.it/new_site/

Thanks

Comments

  • Solved. I had turned off ajax.
    Thanks and sorry
  • AirAir
    Posts: 10,970
    Yes this is exactly why :-)

    With kind regards.
  • edited January 2017 Posts: 48
    Hello Air,
    I have a problem using AJAX.
    On my site, when ajax is enabled, when I go, for example, from the main page to the blog, and then to the page of post, two plugins do not work: Q2W3 Fixed Widget (i fix a few widgets in sidebar) and Yandex Share buttons. They starts to work only after reloading the post page. So the music starts from the begining...

    Can you advise something to solve this problem, so that music work correctly with these features.

    Thank you,
    Pavel.
    Post edited by Air on
  • AirAir
    Posts: 10,970
    Hello PavelT

    Like explained here http://apollo13.eu/docs/photon/#!/ajax_settings other plugins may come in conflict with Photon theme AJAX, and they might not work well. AJAX is rather intended for sites that will focus on using in theme features.

    You would have to dig into these plugins and find what function they run to fire their JavaScript.

    With kind regards.
  • Posts: 48
    Hello Air,

    I fond out that i can add javascript in form "Custom javascript".
    Can you suggest how to put here 2 or more javascipts?
    1 load perfectly, but 2 or more... don't work.

    Thank you,
    Pavel.

    image
    Безымянный12112.jpg
    1825 x 361 - 180K
  • AirAir
    Posts: 10,970
    You can put there as many code as you want, just be sure that it is valid JavaScript code.
    So if you copy code from various Javascript files, then just separate theme with few "enters" ;-)

    With kind regards.
  • Posts: 48
    Hello,
    Can you advise another method to load javascript with ajax, as some javascripts simply don't work in field "custom javascript"?

    For example: javascript for yandex share buttons works well when i use it alone.

    If i use it with other javasipts in field "custom javascript" then noone work.

    If i use other javascripts without "yandex share buttons" then they work.

    <script src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js"></script> <script src="//yastatic.net/share2/share.js"></script>

    With kind regards.
  • AirAir
    Posts: 10,970
    PavelT said:
    <script src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js"></script>
    <script src="//yastatic.net/share2/share.js"></script>
    This is what you put in custom JavaScript code? Then you are lucky that anything works at all. This field is for JavaScript code, not for HTML code that embeds JavaScript.
    This is more for callback that should be called there after AJAX page reload.

    If you don't know what should be put there, you can try to put whole source code of JavaScript file, but I don't promise it will fire these scripts.

    With kind regards.
  • Posts: 48
    No, i use full code. I just wanted to put link to script.

    Thank you for reply.

    As i said all full codes of javascripts don't work together. Separately they work.
  • AirAir
    edited November 2016 Posts: 10,970
    Do you have both codes added now? I am on your site and I don't see any error, which probably happens when you have both. Reply here when you will have two again.

    With kind regards.
    Post edited by Air on
  • Posts: 48
    No. I don't add javascript code for yandex share in "custom javascript" now. As it don't works with javascipts for Q2W3 Fixed Widget and Shortcodes-ultimate in "custom javascript". I have tried many times. I don't know why, but if i put javascript code only for yandex share buttons in "custom javascript" - it works.
    So , maybe, i could put code for javascript for share buttons to some file, not in "custom javascript", so that it started to work togather...? with ajax...
  • AirAir
    Posts: 10,970
    I suspect two things, but can't tell without you adding this code back on your site.
    1. There is some JavaScript error when you add this files. Check console(F12) what it says when you add both files.
    2. There is limit how much code can be put in custom javascript. I don't know anything about such limit but it is possibility.
    PavelT said: So , maybe, i could put code for javascript for share buttons to some file, not in "custom javascript", so that it started to work togather...? with ajax...
    Now that I think about it, this filed "custom javascript" is not connected with ajax just on its own. Only if you will create callback to theme ajax function, then this makes sense. In this case you can as well add all your code at end of js/script.js file. It should give same result, if I am right.

    With kind regards.




Sign In or Register to comment.