Sanu0074,
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function(){
$.Nav = {
init: function(){
return this;
},
begin: function(){
alert('begin nav');
},
destroy: function(){
alert('destroy nav');
}
}
$.Nav2x = {
init: function(){
return this;
},
begin: function(){
alert('begin Nav2x');
},
destroy: function(){
alert('destroy Nav2x');
}
}
$.Nav3x = {
init: function(){
return this;
},
begin: function(){
alert('begin Nav3x');
},
destroy: function(){
alert('destroy Nav3x');
}
}
var params = ["Nav3x","Nav2x"];
function test(params,metod)
{
$.each(params, function(){
$[this][metod]()
});
}
function toDo(){
test(params,'begin')
}
function toStop(){
test(params,'destroy')
}
toDo()
toStop()
});
</script>