Magical text hover sound Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
4 posters

    Magical text hover sound

    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Magical text hover sound

    Post by Joost Thu 15 Feb - 0:08

    Hello ,

    I have one question about my text hover CSS code:
    On my forum use i this CSS code:

    Code:

    a:hover {
    position: relative; 
    top: 1000.0%; left: 0.0%; }
    a:hover {
    background-image:url(http://i39.servimg.com/u/f39/12/23/10/57/sparkl10.gif); }

    This make a glitter text hover. My question now, how can i add a magical sound to this CSS when you hover a link with your mouse on my forum, i have a Harry Potter forum. Very Happy
    Sorry for my english. Embarassed

    My forum: http://www.hpmagicworld.nl/forum (own domainname)

    Many thanks.

    Regards, Joost


    Last edited by Joost on Wed 21 Mar - 20:50; edited 1 time in total
    masesm
    masesm
    Forumember


    Male Posts : 75
    Reputation : 7
    Language : Java, C++, C#, Python, JavaScript, PHP, MySQL, AWS
    Location : United States

    Solved Re: Magical text hover sound

    Post by masesm Thu 15 Feb - 12:27

    HTML:
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <audio id="sound" controls preload="auto">
       <source src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" controls></source>
       Your browser isn't invited for super fun audio time.
    </audio>
    <a href="#" target="_blank">HELLO</a>

    JAVASCRIPT:
    Code:
    var sound = $("#sound")[0];
    $("a")
       .mouseenter(function() {
          sound.play();
       });

    $("a")
       .mouseleave(function() {
          sound.pause();
        sound.currentTime = 0;
       
       });

    CSS:
    Code:
    audio{
      display: none;
    }
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Thu 15 Feb - 15:53

    @masesm, i have add the HTML page, CSS and Javascript (copy and paste your codes) I do not see and hear anything when i move my mouse over the hyperlinks. Embarassed

    Edit, this sound will i add to the hover links. Smile
    avatar
    Guest
    Guest


    Solved Re: Magical text hover sound

    Post by Guest Thu 15 Feb - 22:07

    The problem is the youtube link is not a sound, it is an webpage. You have to find a way to download the sound file from there(google for youtube downloader).
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: Magical text hover sound

    Post by SarkZKalie Thu 15 Feb - 23:03

    Or upload to an 3rd music hosting i.e Vocaroo and then get a direct mp3 link.



    Magical text hover sound Sarkzk10
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Fri 16 Feb - 1:53

    I have upload the sound. How can i install this?
    I do not see and hear anything when i move my mouse over the hyperlinks. Embarassed
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Tue 20 Feb - 16:32

    *Bump topic* many thanks for your help and time. :wouhou:
    masesm
    masesm
    Forumember


    Male Posts : 75
    Reputation : 7
    Language : Java, C++, C#, Python, JavaScript, PHP, MySQL, AWS
    Location : United States

    Solved Re: Magical text hover sound

    Post by masesm Wed 21 Feb - 12:12

    You're doing something wrong mate the code works just fine. Check it out here: https://jsfiddle.net/8zpa1z4m/.
    Send me what you're replacing for sound link.
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Wed 21 Feb - 15:47

    masesm wrote:You're doing something wrong mate the code works just fine. Check it out here: https://jsfiddle.net/8zpa1z4m/.
    Send me what you're replacing for sound link.

    Hello ,

    I want this sound, please. Smile
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: Magical text hover sound

    Post by SarkZKalie Thu 22 Feb - 9:49

    Direct MP3 link here
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Thu 22 Feb - 16:27

    Thanks @SarkZKalie !
    How can i add this to my forum links ? Very Happy
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: Magical text hover sound

    Post by SarkZKalie Sat 3 Mar - 1:00

    Search and replace "sound.mp3" by direct link provided above
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <audio id="sound" controls preload="auto">
      <source src="sound.mp3" controls></source>
      Your browser isn't invited for super fun audio time.
    </audio>
    <a href="#" target="_blank">HELLO</a>



    Magical text hover sound Sarkzk10
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Tue 6 Mar - 2:32

    I have add this to my HTML page, i hear nothing. xD
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: Magical text hover sound

    Post by SarkZKalie Thu 8 Mar - 14:26

    Could you please provide your forum URL and an account test if possible? An account that can accessible to ACP is also good.



    Magical text hover sound Sarkzk10
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Thu 8 Mar - 14:43

    SarkZKalie wrote:Could you please provide your forum URL and an account test if possible? An account that can accessible to ACP is also good.

    I can send a PB with the test account logincodes, i don't give admin accounts for my forum (security reason). As you can tell what i can do. Smile
    Many thanks.

    Edit, PM send.
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: Magical text hover sound

    Post by SarkZKalie Thu 8 Mar - 15:50

    Thing you could do is show what you did. I didn't see any script that masesm gave you before.

    For example :
    A script works on all the page and audio html tag must put in overall_header template maybe



    Magical text hover sound Sarkzk10
    Joost
    Joost
    Active Poster


    Male Posts : 1402
    Reputation : 194
    Language : Dutch, English
    Location : The Netherlands

    Solved Re: Magical text hover sound

    Post by Joost Wed 21 Mar - 20:50

    This is solved now.
    For another members this is the code place this in the
    Code:
    overall_footer_end
    template.

    Code:
      <script>
            $(document).ready(function(){

                $("a").mouseover (function (){

                    $("#mg-song")[0].play();

                });

                $("a").mouseleave (function (){

                    $("#mg-song")[0].pause();
                    $("#mg-song")[0].currentTime = 0; 

                });

                  $('#mg-song').hide();

            });

        </script>

        <audio id="mg-song" controls>
          <source src="HERE YOUR MP3 LINK" type="audio/mpeg" />
        </audio>
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19314
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Magical text hover sound

    Post by Ape Fri 23 Mar - 6:08

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    Magical text hover sound Left1212Magical text hover sound Center11Magical text hover sound Right112
    Magical text hover sound Ape_b110
    Magical text hover sound Ape1010