$(document).ready(function()
{
$("#myTable").tablesorter();
}
);
==== quickSearch ====
* **Función**: Permite agregar una búsqueda ágil a una tabla.
* **Link**: [[http://rikrikrik.com/jquery/quicksearch/]]
* {{fw:others:jquerylibs:jquery.quicksearch.js.zip|}}
Para agregar a la tabla:
$(document).ready(function()
$("#<%= GridView1.ClientID %> tbody tr").quicksearch({
position: 'before',
attached: '#<%= GridView1.ClientID %>',
stripeRowClass: ['oddCell', 'evenCell'],
labelText: 'Cercar a la llista:',
isFieldset: true
});
);
Con ASP.NET, necesitaremos hacer que aparezcan el THEAD y TBODY en el gridView, para ello en el control, después de hacer el binding haremos:
this.GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
==== Timer ====
* **Función**: Permite gestionar tiempos en jQuery.
* **Link**: [[http://plugins.jquery.com/project/Timer]]
Por ejemplo, tras agregarlo, para que cada 30 segundos se llame a una función:
$.timer(30000, function (timer) {
getData();
});
==== Query ====
* **Función**: Permite acceso fácil a la query string.
* **Link**: [[http://plugins.jquery.com/project/query-object]]
* **Archivo**: {{fw:others:jquerylibs:jquery.query.rar|}}
var section = $.query.get('section');
> "info"
var id = $.query.get('id');
> 123
var debug = $.query.get('debug');
> true
var arr = $.query.get('testy');
> ["true", "false", true]
var arrayElement = $.query.get('testy[1]');
> "false"
var newUrl = $.query.set("section", 5).set("action", "do").toString();
> "?action=do§ion=5&id=123"
var newQuery = "" + $.query.set('type', 'string');
> "?action=view§ion=info&id=123&type=string"
var oldQuery = $.query.toString();
> "?action=view§ion=info&id=123"
var oldQuery2 = $.query;
> ?action=view§ion=info&id=123
var newerQuery = $.query.SET('type', 'string');
> ?action=view§ion=info&id=123&type=string
var notOldQuery = $.query.toString();
> "?action=view§ion=info&id=123&type=string"
var oldQueryAgain = $.query.REMOVE("type");
> ?action=view§ion=info&id=123
var emptyQuery = $.query.empty();
> ""
var stillTheSame = $.query.copy();
> ?action=view§ion=info&id=123
==== Splitter ====
* **Función**: Permite hacer los divs redimensionables.
* **Link**: [[http://methvin.com/splitter/]]
* **Archivo**: {{fw:others:jquerylibs:splitter-1.5.1.zip|jQuery Splitter Plugin}}
#MySplitter {
border: 3px solid #669;
min-width: 500px; /* Splitter can't be too thin ... */
min-height: 300px; /* ... or too flat */
height: 100%;
}
#LeftPane {
background: #ddf;
width: 150px;
min-width: 100px;
max-width: 300px;
overflow: auto; /* Scroll bars appear as needed */
}
#TopPane { /* Top nested in right pane */
background: #ccf;
height: 150px; /* Initial height */
min-height: 75px; /* Minimum height */
overflow: auto;
}
#BottomPane { /* Bottom nested in right pane */
background: #eef;
min-height: 100px;
overflow: auto;
}
/* Splitbar styles; these are the default class names */
.vsplitbar {
width: 6px;
background: #669 url(img/vgrabber.gif) no-repeat center;
}
.vsplitbar:hover, .vsplitbar.active {
background: #c66 url(img/vgrabber.gif) no-repeat center;
opacity: 0.7;
filter: alpha(opacity=70); /* IE */
background: #c99;
}
.hsplitbar {
height: 6px;
background: #669 url(img/hgrabber.gif) no-repeat center;
}
.hsplitbar.active, .hsplitbar:hover {
background: #c66 url(img/hgrabber.gif) no-repeat center;
}
...
$().ready(function() {
$("#MySplitter").splitter({
splitVertical: true,
outline: true,
sizeLeft: true,
anchorToWindow: true,
accessKey: "I"
});
$("#RightPane").splitter({
splitHorizontal: true,
sizeTop: true,
accessKey: "H"
});
});
...
Texto en la parte izquierda.
Texto en la parte derecha-arriba.
Texto en la parte derecha-abajo.
==== Tabs ====
* **Función**: Te muestra tabs (pestaña) a partir de una lista.
* **Link**: [[http://stilbuero.de/jquery/tabs/]]
* **Archivo**: {{fw:others:jquerylibs:jquery.tabs.zip|jQuery Tabs}}
...
...
...
...
First tab is active by default:
Prueba
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
==== jGrowl ====
* **Función**: Muestra mensajes en formato "mac".
* **Link**: [[http://stanlemon.net/projects/jgrowl.html]]
* **Archivo**: {{fw:others:jquerylibs:jgrowl-1.2.4.zip|jGrowl}}
$.jGrowl("Hello world!");
$.jGrowl("Stick this!", { sticky: true });
$.jGrowl("A message with a header", { header: 'Important' });
$.jGrowl("A message that will live a little longer.", { life: 10000 });
$.jGrowl("A message with a beforeOpen callback and a different opening animation.", {
beforeClose: function(e,m) {
alert('About to close this notification!');
},
animateOpen: {
height: 'show'
}
});
...
.jgError { color: red; }
div.jGrowl div.jgError {
background-color: #FFF1C2;
color: navy;
}
....
$.jGrowl("hola", { sticky: true, theme: "jgError" });
===== Librerías de JavaScript =====
==== TinyMCE ====
* [[http://tinymce.moxiecode.com/|Sitio oficial]]
* {{fw:others:tinymce_3_2_7.zip|}}
=== Agregarlo cuando se utiliza jQuery ===
* {{fw:others:jquerylibs:tinymce_3_2_7_jquery.zip|}}
$(document).ready(function() {
$('textarea').tinymce({
script_url: './jscript/tiny_mce/tiny_mce.js',
theme: "advanced"
});
});