Conhecimento nunca é demais
JavaScript
Dica Rápida – Jquery – Somente Números
30/01/12
Para que no nosso campo seja permitido somente valores numéricos, utilizamos a seguinte função:
$(function(){
$("input[name='nome-do-campo']").bind("keyup blur focus", function(e) {
e.preventDefault();
var expre = /[^0-9]/g;
// REMOVE OS CARACTERES DA EXPRESSAO ACIMA
if ($(this).val().match(expre))
$(this).val($(this).val().replace(expre,''));
});
});
Valeu e até a próxima…
240 plugins jquery – Separados por categoria
07/09/10
Form Validation
jQuery Validation.
Auto Help.
Simple jQuery form validation.
jQuery XAV – form validations.
jQuery AlphaNumeric.
Masked Input.
TypeWatch Plugin.
Text limiter for form fields.
Ajax Username Check with jQuery.
File upload
Ajax File Upload.
jQUploader.
Multiple File Upload plugin.
jQuery File Style.
Styling an input type file.
Progress Bar Plugin.
Form – Select Box stuff
jQuery Combobox.
jQuery controlled dependent (or Cascadign) Select List.
Multiple Selects.
Select box manipulation.
Select Combo Plugin.
jQuery – LinkedSelect
Auto-populate multiple select boxes.
Choose Plugin (Select Replacement).
Form Basics, Input Fields, Checkboxes etc.
jQuery Form Plugin.
jQuery-Form.
jLook Nice Forms.
jNice.
Ping Plugin.
Toggle Form Text.
ToggleVal.
jQuery Field Plugin.
jQuery Form’n Field plugin.
jQuery Checkbox manipulation.
jTagging.
jQuery labelcheck.
Overlabel.
3 state radio buttons.
ShiftCheckbox jQuery Plugin.
Watermark Input.
jQuery Checkbox (checkboxes with imags).
jQuery SpinButton Control.
jQuery Ajax Form Builder.
jQuery Focus Fields.
jQuery Time Entry.
Time, Date and Color Picker
jQuery UI Datepicker.
jQuery date picker plugin.
jQuery Time Picker.
Time Picker.
ClickPick.
TimePicker.
Farbtastic jQuery Color Picker Plugin.
Color Picker by intelliance.fr.
Rating Plugins
jQuery Star Rating Plugin.
jQuery Star Rater.
Content rater with asp.net, ajax and jQuery.
Half-Star Rating Plugin.
Search Plugins
jQuery Suggest.
jQuery Autocomplete.
jQuery Autocomplete Mod.
jQuery Autocomplete by AjaxDaddy.
jQuery Autocomplete Plugin with HTML formatting.
jQuery Autocompleter.
AutoCompleter (Tutorial with PHP&MySQL).
quick Search jQuery Plugin.
Inline Edit & Editors
jTagEditor.
WYMeditor.
jQuery jFrame.
Jeditable – edit in place plugin for jQuery.
jQuery editable.
jQuery Disable Text Select Plugin.
Edit in Place with Ajax using jQuery.
jQuery Plugin – Another In-Place Editor.
TableEditor.
tEditable – in place table editing for jQuery.
Audio, Video, Flash, SVG, etc
jMedia – accessible multi-media embedding.
JBEdit – Ajax online Video Editor.
jQuery MP3 Plugin.
jQuery Media Plugin.
jQuery Flash Plugin.
Embed QuickTime.
SVG Integration.
Chamando uma função que está dentro de um iframe
23/08/10
Para você chamar uma função dentro de um iframe basta você rodar o seguinte script:
<script type="text/javascript"> window.frames["nome_do_iframe"].minhaFuncao(); </script>
Para fazer o inverso, ou seja, de dentro de um iframe chamar uma função na página pai:
<script type="text/javascript"> parent.minhaFuncao(); </script>
simples assim.
valeu.
Detectando o iPad com PHP, Javascript e .htaccess
22/08/10
O novo iPad da Apple é identificado pelo seguinte User Agent:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
Sabendo como os novos iPads são identificados aqui vão algumas soluções para que vocês possam identificá-los e fazer suas versões dedicadas a partir daí:
Detectando iPad com PHP
$isiPad = (bool) strpos ($_SERVER['HTTP_USER_AGENT'],'iPad');
Detectando iPad com Javascript
var isiPad = navigator.userAgent.match(/iPad/i) !=null
Detectando o iPad com .htaccess
RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ http://ipad.seudominio.com [R=301]