WordPress.org

Ready to get started?Download WordPress

Forums

MP3-jPlayer
This Plugin Rocks!! One Inquiry Though.. "SetMedia Click Function" (1 post)

  1. nerdymusic
    Member
    Posted 1 year ago #

    Hello,

    #1. Absolutely love this plugin and prefer it over any other!

    #2. I've designed a custom main player for my site that is fixed to the header and I've been dying to find out if there is a way to add a 'SetMedia Click Function' so that if a mp3 link is clicked, it will play in the "main player" within my header.

    (I was able to do this with the original Happy Worm Jplayer but I can't get this to work!)

    The code I've been fiddling with is:

    $(document).ready(function(){
        $("#jquery_jplayer").jPlayer({
            swfPath: "/ui/core/js/jPlayer/",
            supplied: "mp3",
            wmode: "window"
        });
    
        $('.voice').click(function(e) {
            e.preventDefault();
            $("#jquery_jplayer")
                .jPlayer("setMedia", {mp3: this.href })
                .jPlayer("play");
        });
    });

    If anyone is able to answer this I really appreciate it... Thank you!

    -Jo

    http://wordpress.org/extend/plugins/mp3-jplayer/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic