Il miglior tutorial layout di jQuery EasyUI - aggiungere scheda AutoPlay (Tabs) Nel 2024, in questo tutorial puoi imparare Scarica esempi jQuery EasyUI,

layout di jQuery EasyUI - aggiungere scheda AutoPlay (Tabs)

Questo tutorial vi mostrerà come creare un autoplay Tabs. componente Tabs visualizza il primo pannello a schede, quindi visualizzare il secondo, terzo it. saremo scrivere del codice per passare automaticamente pannelli struttura a schede, quindi lasciarlo ciclo.

Passo 1: Creare Tabs

	<Div id = "tt" class = stile "easyui-tabs" = "width: 330px; height: 270px;">
		<Title Div = stile "Shirt1" = "padding: 20px;">
			<Img src = "images / shirt1.gif">
		</ Div>
		<Title Div = stile "shirt2" = "padding: 20px;">
			<Img src = "images / shirt2.gif">
		</ Div>
		<Title Div = stile "shirt3" = "padding: 20px;">
			<Img src = "images / shirt3.gif">
		</ Div>
		<Title Div = stile "shirt4" = "padding: 20px;">
			<Img src = "images / shirt4.gif">
		</ Div>
		<Title Div = stile "Shirt5" = "padding: 20px;">
			<Img src = "images / shirt5.gif">
		</ Div>
	</ Div>

Fase 2: Scrivere codice Autoplay

	Indice var = 0;
	var t = $ ( '# tt');
	var = schede t.tabs ( 'schede');
	setInterval (function () {
		t.tabs ( 'selezionare', le schede titolo [index] .panel ( 'opzioni').);
		Indice ++;
		se (indice> = tabs.length) {
			index = 0;
		}
	}, 3000);

Come si può vedere, l'approccio che noi chiamiamo le "schede" per ottenere tutti i pannelli struttura a schede, e utilizzare la funzione 'setInterval' per passare loro.

Scarica esempi jQuery EasyUI

jeasyui-layout-tabs3.zip

layout di jQuery EasyUI - aggiungere scheda AutoPlay (Tabs)
10/30