Profile
Achievement
chlab's Recent Snippets
- All /
« 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
1389
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
738
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
796
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
969
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
704
posted 14 years ago by chlab