Carlita

Just another Blog de ESPOL weblog

JQueryUI Hello accordion

noviembre13

=)Paso#1: Insertar la porción de tags que se convertiran formaran el accordion

<html>

<head>

<title>pagina1</title>

<!--AQUI SCRIPTs -->

</head>

<body>

<div id="accordion">

  • <h3><a href="#">First header</a></h3>
  • <div>First content</div>
  • <h3><a href="#">Second header</a></h3>
  • <div>Second content</div>

</div>

</body>

</html>

=)Paso#2: //Añadir los css y js de JQueryUI y JQuery

<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.16.custom.css">
<script src="js/jquery-1.6.2.min.js"></script>
<script src="js/jquery-ui-1.8.16.custom.min.js"></script>
<script>
$(function() {
$( "#accordion" ).accordion(); //este convierte esos tags en accordion
});
</script>
Así a cualquier div que tengas añádele un header h3 y te queda un lindo accordion =)
posted under Uncategorized

Email will not be published

Website example

Your Comment: