solved Jquery or ?

Dazed
Dazed
@dazed
8 years ago
1,022 posts
I am looking to move a few items from ProJam to Audio Pro. I want to move the Feature Artist Slider and Favorite Artist over to Audio Pro. What js is used here? I thought it was just jquery and should probably work without me having to add anything but no go. Does anyone know what js was being used for these? It could be a code issue but I thought I would start here first.

Thanks
updated by @dazed: 03/13/17 12:20:15AM
michael
@michael
8 years ago
7,719 posts
jquery will be in both skins, its part of core.

What you need to figure out is what initalizes the behavior. It will usually be something like:
$( document ).ready(function() {
    // something in here, this happens after the page loads.
});
douglas
@douglas
8 years ago
2,791 posts
You'll need the jrLoad function from the jrProJam.js file

function jrLoad(id,url,round_id,round_num) {
    if (typeof url == "undefined") {
        return false;
    }
    if (url == 'blank') {
        $(id).hide();
    }
    else if (id == '#hidden') {
        $(id).hide();
        $(id).load(url);
    }
    else {
        if (id == '#rank') {
            var t = $('#rank').height();
            if (t == null) {
                $('#main').html('<div class="inner"><div id="rank"></div></div>');
            }
        }
        var h = $(id).height();
        if (h > 150) {
            $(id).height(h);
        }
        $(id).fadeTo(100,0.5,function() {
            $(id).html('<div style="text-align:center;padding:20px;margin:0 auto;"><img src="'+ core_system_url +'/skins/jrProJam/img/loading.gif" style="margin:15px;"><br>Loading...</div>');
            $(id).load(url,function() {
                var l = $(id).text();
                if (l.length < 1 && id != '#player') {
                    $(id).html('');
                }
                if (h > 150) {
                    $(id).height('100%');
                }
                if (round_id && round_num > 0) {
                    $(id).fadeTo(100,1.00,function() {
                        if (jQuery.browser.msie) {
                            this.style.removeAttribute('filter');
                        }
                        $(round_id).corner(round_num +'px');
                    });
                }
                else {
                    $(id).fadeTo(100,1,function() {
                        if (jQuery.browser.msie) {
                            this.style.removeAttribute('filter');
                        }
                    });
                }
            })
        });
    }
}

for the favorite artist and song buttons.

And you'll need the responsiveslides.min.js from the ProJam js folder as well. The jQuery for the image slider itself is in the ProJam header.tpl file.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Dazed
Dazed
@dazed
8 years ago
1,022 posts
Thanks! Now that I look at this I see a lot of functions I need to bring in.

Douglas stop posting and finish up your projects lol :)

Much appreciated.
douglas
@douglas
8 years ago
2,791 posts
lolglad that sorted it for you.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos