chlab


Member since 02/09/2010

Name: Chris Leuenberger

Location: Switzerland

Website: http://www.chlab.ch/

5 snippets

0 profile views

View their favorites

Profile

All time reputation: 17

Achievement

first submission:submitting first snipplet

chlab's Recent Snippets



« Prev 1 Next »
  1. FAV

    Copy one element\'s eventhandlers to another

    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...
    jQuery 5 views posted 7 years ago chlab
  2. FAV

    Replace (update) a View in a ScrollableView in Titanium Mobile

    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...
    JavaScript 1 views posted 8 years ago chlab
  3. FAV

    Create a transparent TabbedBar for Titanium Mobile

    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...
    JavaScript 3 views posted 8 years ago chlab
  4. FAV

    Split string into array

    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 />)....
    JavaScript 0 views posted 9 years ago chlab
  5. FAV

    Easy folder structure set up

    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...
    PHP 5 views posted 10 years ago chlab
« Prev 1 Next »