Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This two liner is powerful. It shows you how to find images on a page based on the source (src) and replace them with another image.
0
1762
posted 15 years ago by chrisaiv
A function that resizes an image to desired width and height, but does not distort the image proportions. Works for JPEG, GIF and PNG.
0
2302
posted 15 years ago by TimoZachi
jQuery
Create a dynamic \"Link to top of page\" with fade and positioned at some pixels of bottom when scrolls to this position
Changes 340px with the page footer height.
CSS:
#top_link{
position:fixed;
bottom:20px;
right:50%;
margin-right:-600px;
overflow:hidden;
text-indent:-9999px;
background:url(../img/top.png) no-repeat 0 0;
display:block;
width:5...
1
3768
posted 15 years ago by leobetosouza
This code snippet gets all information from a YouTube video (title, description, duration, thumbnail url, thumbnail width, thumbnail height, etc..) using the video id and YouTube API.
0
4976
posted 15 years ago by TimoZachi
Establece la variable de validación en false y genera el mensaje de error de validación en función de los parámetros introducidos.
Recibe el elemento y los parámetros de validación.
0
1732
posted 15 years ago by alberomo
Descripción: Valida los campos de fechas que requieren tienen un lÃmite máximo enviados por la función validaForm-->http://snipplr.com/view/58245/funcin-validaform-para-validar-formularios-con-parmetros-xml-y-nombres-de-clase/. En el caso de que...
0
1596
posted 15 years ago by alberomo
Descripción: Valida los campos de fechas que tienen un lÃmite mÃnimo enviados por la función validaForm-->http://snipplr.com/view/58245/funcin-validaform-para-validar-formularios-con-parmetros-xml-y-nombres-de-clase/. En el caso de que no sea val...
0
1739
posted 15 years ago by alberomo
You do not have Page object available everywhere to use Page.ResolveUrl. Here is an alternate.
0
2035
posted 15 years ago by plugables
Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
0
2532
posted 15 years ago by Huskie
Could possibly be simplified to maximise efficiency. It relies on a separare WP Sleek framework function sleek_get_theme_menu_name. This could ideally be improved to allow the theme location to passed as a parameter somehow.
0
2599
posted 15 years ago by Huskie