Archive for the javascript Category

1 Jun 2014

extender – Array

16:52 | javascript | 1047 views

Goal: give some additional function to the Array type // 1. remove the specified element TypeExtend(Array, ‘remove’, function(from, to) { try{ var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); } catch(e){ return false; } }); // 2. remove all […]


31 May 2014

extender – Object

22:52 | javascript | 1240 views

Goal: give some additional function to the Object type available extends: objectId: global unique identifier for every DOM and non DOM object _bind, _unbind, _trigger: bind logic for every DOM and non DOM object _trace, _watch: easy setable trace and watch functionality _catch (SET catching): bind a function to the variable setter _chain: to investigate […]


31 May 2014

extender – Math

15:05 | javascript | 1128 views

Goal: give some additional function to the Math object


31 May 2014

random value beetween 2 numbers

14:48 | javascript | 1059 views

Goal: get a number between a range let’s extend the Math object:


31 May 2014

extender – string

12:47 | javascript | 1074 views

Goal: give some additional function to the String type


31 May 2014

jQuery Easing Cheat Sheet

8:36 | cheetsheet, javascript, jquery | 1861 views

Goal: provide quick reference of easing 1. coding skeleton 2. easing reference source: easings.net see also: easing fix for wordpress, other cheet sheets


28 May 2014

javascript extender (TypeExtend)

12:28 | javascript | 1113 views

I have read on many pages that this is evil like eval. Everything is evil if you can’t use that. Unsafe extend. In this sample I aggree with the evli idea. This is simple and dangerous. Safe version. Better but not the best. the skeleton and the code instead of this almost nice solution do […]


27 May 2014

string contains other or not

22:39 | javascript | 1035 views

in c# we can use to check a string So I need a similar function in javascript. Here is:


27 May 2014

replace all linkable url in a string to real link

22:38 | javascript | 1044 views

As earlier to solve this is easy to extend the string object.


27 May 2014

cut the unwanted tail

22:37 | javascript | 1043 views

There is a big array and the items joined by comma like this: I don’t need the end with the many unwanted comma. I try to cut the string at the last real value. Let’s extend the string object with the followings: to call this:


#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }