Hi Sig, you can achieve that by
function my_function(panel_id) { var $container = $("#"+panel_id+" .container'"); ... } Hope that will work for you . Regards Umair On Jul 20, 11:35 am, macsig <sigbac...@gmail.com> wrote: > Hello guys, > > I have found a script that works fine for me but I'd like to make it > reusable but I have an issue with that. > > On the script I have something like > > function my_function() { > var $container = $('#panel .container'); > ... > > } > > and I'd like to pass the id (panel in this case) as a parameter like > in the example below: > > function my_function(panel_id) { > var $container = $('#--- .container'); > ... > > } > > How can I achieve my goal? > > Thanks and have a nice day. > > Sig