Client-Side: HTML CSS JavaScript

Desenvolvimento WEB: O Céu é o limite

Plugins

Removendo atributos usando jQuery

Para remover atributos de elementos HTML usando a biblioteca jQuery fica fácil. Veja o código abaixo. jQuery.fn.removeAttributes = function() { return this.each(function() { var attributes = $.map(this.attributes, function(item) { return item.name; }); var elemento_escolhido = $(this); $.each(attributes, function(i, item) { elemento_escolhido.removeAttr(item); }); }); } Este código cria, podemos dizer um plug-in para remover todos os [...]

Tags: , , , ,

Posted in Plugins | 2 Comments »

Criando gráficos com jQuery e o plugin Charts

Gerar um gráfico, com uma barra horizontal, usando o framework jQuery é muito simples. Basta você fazer o dwonload do plugin jquery.charts.js e escrever uma tabela com alguns dados organizados de forma lógia e pronto. No HTML <table id=”stats”> <caption>Estatística</caption> <thead> <tr> <th>Navegador</th> <th>Usuários</th> </tr> </thead> <tfoot> <tr> <td>Total</td> <td>100</td> </tr> </tfoot> <tbody> <tr> <td>Mozilla [...]

Tags: , , , ,

Posted in Charts | No Comments »

Cookie com jQuery

É muito comum no dia-a-dia do desenvolvimento WEB, exisitr uma aplicação que necessite de um link, usando o elemento a do HTML, para chamar uma função JavaScript. Neste caso então não seria usado o atributo href do elemento a. No entanto, quando isso acontece a pseudo-classe :visited que é atribuída ao elemento a do HTML, [...]

Tags: , , , , ,

Posted in Cookie | No Comments »