There is a problem, when you call, it gives an error

window.Market = {} new window.Market.Liner($('body .content .products .liner')).activate() window.Market.Liner = function(place, options=null) { ........ ........ } 

    1 answer 1

    Swap function definition and call

     window.Market = {} window.Market.Liner = function(place, options=null) { ........ } new window.Market.Liner($('body .content .products .liner')).activate() 

    Or define the Liner method when declaring the object itself.

     window.Market = { Liner: function(place, options=null) { ........ } } new window.Market.Liner($('body .content .products .liner')).activate()