Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Handy. Hide an element as soon as possible, before document.ready. The element gets hidden but only when a class is applied to the html via js.
1
962
posted 14 years ago by Meander365
I can see this being useful for when you want to pass a lot of associated data to an event handler from elements and their chosen trigger action.
1
1097
posted 14 years ago by Meander365
As an example – will find and replace all `<b>` elements with `<strong>`
0
1536
posted 14 years ago by jayphen
Use this function to filter your first and last menu items and assign them each a specific class name. This is very handy when applying separators in CSS but want to exclude the first and/or last items.
3
1035
posted 14 years ago by fjarrett
Add your own text and/or link to the admin footer area. Don\\\'t forget to leave in some credit for WordPress and other helpful links.
1
782
posted 14 years ago by fjarrett
Clean up your Admin Editor view by removing unwanted meta boxes that create clutter.
0
799
posted 14 years ago by fjarrett
Keep your WordPress theme code free from harm by removing the Editor link in the Admin Appearance menu.
0
830
posted 14 years ago by fjarrett
Clean up your WordPress backend by removing unwanted admin menus that create clutter.
0
801
posted 14 years ago by fjarrett
Alternative for "return false;"
stopPropagation(); prevents for bubbling up the dom
preventDefault(); prevents the browser from performing the default action
1
1052
posted 14 years ago by dkl3in
Change \"wp\" to your database prefix. Note, this is the quick and dirty way. The more thorough way, which will also clean any tags or categories that are now unused, is here: http://www.snipplr.com/view/29570/get-rid-of-unused-post-revisions/
2
816
posted 14 years ago by jessibird
For those multiple rollovers - and their multiple flashes! The solution is to stop(!) them.
2
938
posted 14 years ago by Meander365
Dave Metvin\'s method. Two tricks to the method:\r\n\r\n$($boxes[div++] || []) - increaments \"div\" and passes an empty array if the element doesnt exist (so it exists).\r\n\r\narguments.callee - the name of the function currently being executed.
1
948
posted 14 years ago by Meander365
Quick conversion from a string of binary into ascii, and back again.\r\nUse B* for MSB and b* for LSB first.
0
1002
posted 14 years ago by jimbobmcfred
PHP scripting block can be placed anywhere in the document. It always starts with <?php>.
The example of PHP code below sends the text “Oheon.com†to the browser:
0
919
posted 14 years ago by Masis
Eu ouço podcasts no mp3 do carro.
Problema: Se quero adiantar 10 minutos, preciso ficar 3 minutos com o dedo pressionando o >> :(
Solução: Dividir podcasts com mais de 40Mb em trechos de 5 minutos.
A linha abaixo acha esses arquivos no cartÃ...
0
681
posted 14 years ago by gpupo
When you load content into a jquery ui dialog box which contains a textarea element that you use FCKeditor on. The second time you open the dialog, FCKeditor fails to load.
You have to destroy it when you close the dialog box.
0
1044
posted 14 years ago by Meander365