Kullanıcı:Learath2/JavaScript/test.js

Vikipedi, özgür ansiklopedi
Not: Sayfayı kaydettikten sonra değişiklikleri görebilmek için tarayıcınızın önbelleğinizi temizlemeniz gerekir. Google Chrome, Firefox, Microsoft Edge ve Safari: ⇧ Shift tuşuna basılı tutun ve Yeniden Yükle araç çubuğu düğmesine tıklayın. Ayrıntılar ve diğer tarayıcılara yönelik yönergeler için Vikipedi:Önbelleğinizi atlayın sayfasını inceleyin.
cat_index = new Array();
num_of_cats = 1;
var x = 0;
function new_category( name )
{
        cat_index[x] = new Array();
        cat_index[x][0] = name;
        x++;
        num_of_cats++;
}

function creating_procedures()
{
        CreateSidebars();
}

function CreateSidebars ()
{
        var tmp = num_of_cats;
        var z = tmp - 1;
        while(tmp != 1)
       {
        var name2 = cat_index[0][0];
   	var id = 'p-favlinks-' + tmp;

	/* copy the toolbox, so it matches the format used in the current skin */
	var $sidebar = $('#p-tb').clone().attr('id', id);

	/* make sure it's expanded (Vector skin) */
	$sidebar.removeClass('collapsed').addClass('expanded');
	$sidebar.find('div:first').css({'display': 'block'});

	/* update values */
	$sidebar.find('h5').text(name2);
	$sidebar.find('ul').empty();

	/* add toolbar */
	$('#p-tb').parent().append($sidebar);
        tmp--;
        }
}

function IntializeSyS ()
{
     user_scope();
     creating_procedures();
}
$(function()
{
IntializeSyS();
});