12 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for shilpa647

After page loading , when I click on the ellipsis , horizontal tabs transform from bottom of the product image . After opening of the tabs menu bar , first tab should open by default.I tried multiple solutions but none of them worked out.

0
207
Member Avatar for paulkd

...was asked for some php file upload code, so I thought I would post some stripped down, barebones code that I use in admin/dashboard pages to add/change images associated with products. Please see attached image for folder setup. The code uses the [jQuery Form](http://malsup.com/jquery/form/) plugin by Mike Alsup. **index.php** has …

Member Avatar for NaReSh_12
1
11K
Member Avatar for pritaeas

In response to [this thread](https://www.daniweb.com/programming/web-development/threads/499762/jquery-for-dropdown-textbox) I've decided to paste the linked example as a code snippet (updated to html5/jQuery2).

Member Avatar for diafol
2
335
Member Avatar for JorgeM

A while back, I was working on some web pages that required a tabbed menu at the top of the content. In addition, the requirement was that the page should not perform a post back when the user clicked on the individual tabs. It was very important to have a …

2
278
Member Avatar for JorgeM

When users interact with your web page and processes, it is important to provide them with continuous feedback. Without the feedback, a user is left wondering if you page is actually processing work, frozen, or just not working. This is especially true when incorporating Ajax requests that take more than …

2
1K
Member Avatar for diafol

Hello All. Been playing around with some linked dropdowns. It seems to be a recurring theme here on DW, so I thought I'd offer this up as a possible solution or for discussion, to see how it could be improved. The premise for this set of linked dropdowns is that …

Member Avatar for diafol
5
941
Member Avatar for diafol

**// EDIT 2014-04-07 //** New version (1.0.3) posted at the [bottom](http://www.daniweb.com/web-development/php/code/476623/ajaxed-linked-dropdowns-select-fields-for-volatile-data#post2082327) Demo Page: http://demos.diafol.org/ajax-linked-dropdowns.php *********************************************** Hello All. Been playing around with more linked dropdowns (select form fields), following the code snippet posted for static-ish data [here](http://www.daniweb.com/web-development/php/code/475238/linked-dropdowns-select-fields-for-static-ish-data). The static-ish version is of limited use (or of no use!) if data in …

Member Avatar for diafol
3
1K
Member Avatar for josverhoeff

Hi, I thought I'd share this with you. If you want all fields on a web form to be emptied of ther initial value (if any) on focus and filled again with the initial value on blur. Works with jquery.

Member Avatar for JJenZz
0
246
Member Avatar for Airshow

Tablesorter (currently v2.0.5) includes an "update" method. This method keeps a Tablesorter object up to date with dynamic changes made to its table(s). Like other Tablesorter methods "update" is implemented in the form of a custom event. A typical method call would be $table.trigger("update"); , where $table is a jQuery …

Member Avatar for punknroll
0
763
Member Avatar for sun-tzu

I just made this code today for a site I'm working on and figured people may try to improve it. To use: [CODE] $("#randomize").randomize(); [/CODE] [CODE=HTML] <!DOCTYPE HTML> <html> <head> <title>Random Pick Test</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script> <script type="text/javascript" src="randomize.jQuery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#randomize").randomize({ direction: 'topToBottom', evenBG: '#FFF', evenFG: '#000', …

Member Avatar for Taywin
0
686
Member Avatar for Luckychap

This is Jquery plugin which can be used to change the content a its place. Features: 1. Easy to use 2. Maintain changeability of Jquery Know Issue: 1. Can take html string also as input For example: html: [code=html] <div id="editable">I can be changed right here</div> [/code] javascript: [code=javascritp] $.('#editable').editAtPlace(function(newtext, …

0
359
Member Avatar for peter_budo

In my current project we need to provide drag&drop functionality of items from left to right and vice-versa and on click of the button send array of item IDs to server. Main problem was that we couldn't get array across to server and online examples that we found did not …

2
904

The End.