Welcome To Snipplr
Everyone's Recent Snippets Tagged jquery
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This goes through the specified div, and finds a div with the class of current. It then removes the class from that div, and adds it onto the next one. Note: Through CSS make the current class with a display block, and the slide class with a displ...
0
1251
posted 14 years ago by accelm
There are a couple of steps involved to connect to an SAP web service. Really, its about the same as connecting to a regular ASMX web service, using the .ajax() function. Make sure you have a WSDL with the function and connection information. I recom...
0
2218
posted 14 years ago by mattvbiggs
This prepends a `#` if it's not already there. Useful when doing jQuery selectors.
0
1211
posted 14 years ago by EvanHahn
Use:
<script>
$(document).ready(function(){
$("#input").forceNumeric();
});
</script>
1
1621
posted 14 years ago by itsmeameer
This is a very simple way of highlighting the current page of a menu. It uses javascipt to take the current url and cross checks it against any URLs that match in the menu. If one matches then add an ‘active’ class to it.
Be careful with #’s t...
1
1714
posted 14 years ago by soup
A new version of my most popular jQuery plugin -Twitter Friends widget. This version aims to be better looking and easier to setup.
1
1705
posted 14 years ago by mikemore
Set a variable by getting the URLs id with PHP. Find the the option with the name value that is equal with the variable and add "selected" to it.
0
1757
posted 14 years ago by LadyLoomis
Hides the button based on scroll position, fades in and out as necessary and upon click smoothly scrolls back to the top.
0
1548
posted 14 years ago by thewickedchemist
Simple jQuery accordion function for jQuery version 1.7.1 and above.
3
1714
posted 14 years ago by digitalclubb
Grab jQuery library from Google's CDN this way its faster, burns Google's bandwidth and not yours. Also users will have this cached if other sites are using it as well.
Downside of course is Google's servers do go down. This script will check if...
1
1659
posted 14 years ago by cyberpunkstudio
Simple solution to add dropdowns quickly to any site.
0
1483
posted 14 years ago by thewickedchemist
Basic setup code for jQuery, linking to Google APIs for the jQuery library.
2
2044
posted 14 years ago by adrianparr
Simple Show/Hide Panel we learned in class for an assignment.
0
1165
posted 14 years ago by ninacess
Usually when working with form you use a server to handle it, and if your doing it entirely in javascript no reload is required, but what if you wanted to take the information and use it in a javascript on another page, completely client side. I had...
0
2930
posted 14 years ago by FatFolderDesigner
Go through all the authors of a wordpress import and make them the same as the previous authors (Wordpress 3.3).
0
1519
posted 14 years ago by jcottrell
Delete a page of wordpress posts with one click ("Run" in Firebug or Developer Tools)
0
1305
posted 14 years ago by jcottrell
This code snippet fetches the very latest minified version of jQuery from Google's CDN. If this is not available, we revert to a locally stored version (current version at time of publish was 1.7.1 - update this to suit going forward).
1
1915
posted 14 years ago by Huskie
A clean and simple jQuery function for creating a tabbed element. This one allows multiple tabbed elements on 1 page (which has been the downfall of so many others)
1
1589
posted 14 years ago by digitalclubb