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
668
posted 12 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
1424
posted 12 years ago by mattvbiggs
This prepends a `#` if it's not already there. Useful when doing jQuery selectors.
0
640
posted 12 years ago by EvanHahn
Use:
<script>
$(document).ready(function(){
$("#input").forceNumeric();
});
</script>
1
783
posted 12 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
901
posted 12 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
905
posted 12 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
980
posted 12 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
863
posted 12 years ago by thewickedchemist
Simple jQuery accordion function for jQuery version 1.7.1 and above.
3
984
posted 12 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
899
posted 12 years ago by cyberpunkstudio
Basic setup code for jQuery, linking to Google APIs for the jQuery library.
2
1231
posted 12 years ago by adrianparr
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
1148
posted 12 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
857
posted 12 years ago by jcottrell
Delete a page of wordpress posts with one click ("Run" in Firebug or Developer Tools)
0
726
posted 12 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
1049
posted 12 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
833
posted 13 years ago by digitalclubb