|
||||||
| JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
say i have these two functions:
function one(object) object.style.right=1px; function two(object) { object.style.top=1px; } is there a way i could reduce redundancy by combining these two functions into one by adding an extra parameter? im thinking of something like this: function three(object, direction) { object.style.direction=1px; } how would i do something like this? |
| Sponsored Links |
|
|
|
|||||
|
Moved to the correct forum.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CRC (JavaScript) | RobotGymnast | JavaScript and CSS | 3 | 04-21-2008 03:02 PM |
| Nortan Popup Blocker + JavaScript Issue | twalters84 | JavaScript and CSS | 3 | 03-11-2008 04:47 AM |
| PHP accessing through remotely javascript from another website | deny | Request Services (Paid) | 4 | 01-28-2008 08:02 AM |
| [Easy as Pie] Unobtrusive JavaScript | Kernel | Programming News | 0 | 12-20-2007 09:07 AM |
| Counting Files with JavaScript | Matt | JavaScript and CSS | 5 | 08-01-2007 12:02 PM |