Member since 02/09/2010

Name: Chris Leuenberger

Location: Switzerland


5 snippets

2008 profile views

1 Comment(s) Posted

View their favorites



first submission:submitting first snipplet

chlab's Recent Snippets

« Prev 1 Next »
Here's a snippet for copying (all) the eventhandlers of one element to another with jQuery and effectively cloning the behavior of one element. Keep in mind that if it's possible, you should just register the same handlers you actually need, inste...
0 1245 posted 12 years ago by chlab
It’s pretty straightforward, we loop the existing Views of the ScrollableView and copy each View, replacing the one to be change, to a new array. Then we tell the ScrollableView to use our new Views-array for it’s Views. I hope this helps someon...
0 612 posted 13 years ago by chlab
We create a View with a background color, put a semi-transparent TabbedBar with empty button names on top of it, then add another layer of fully visible labels spaced to fit the TabbedBar beneath it. Everything is then wrapped in one View, which you...
0 680 posted 13 years ago by chlab
I needed to break down a long string today and insert line breaks so I wrote this little function. You can use it to split a long string into chunks of a defined length and get them as an array or join them by a defined character (e.g. <br />)....
0 811 posted 14 years ago by chlab
Here is a function you can use to automatically set up a complex folder structure with a specified file mode. All you have to do is create the "root" directory and pass an array describing the folder structure you would like to create in it. If the d...
0 581 posted 14 years ago by chlab
« Prev 1 Next »