treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Add/Remove Class, not working on iPhone

  • Howdy,

    I'm working on a minimal design for myself, I've tested in in Chrome, Opera, Firefox and Safari
    and I think it degrades nicely in IE8
    When you click on a date in the timeline it adds a class "open" to the element which adds 60px to the height
    But for some reason, on mobile safari this doesn't work

    I've tried using .attr('class','open'); and .addClass('open'); which both work fine in normal browsers

    Anybody come accross this before?

    Here's the work in progress (far from complete)
    http://www.pixelcutters.com/2.0/
  • Must be something with that nano function in your .js file. If you remove everything before the var ua = navigator.userAgent line, it does work on iPhone.
  • Thanks Senff
    It looks like there's conflicting bind events
    I'll have to integrate my script into this nano scroller plugin
    :)
  • Added a condition to not allow this script to run on iOs devices :)
  • What's the reasoning behind such a small scroll area Karl?
  • Just to be different :)
    most people take full sized sites and make them smaller for mobile devices
    I wanted to try make something that would be the same on all of them
  • Fair enough, my only concern is that it's a bit of a nightmare usability wise :(

    I'd rather have a single page that scrolled instead of multiple scrolling elements.
  • I might actually take out that timeline thing
    It's mostly BS and doesn't look right ha
  • I think it's pretty interesting, but maybe you could come up with a more original way to show it?
  • I was also thinking of a horizontal slider that you drag with the mouse or swipe on touch devices
    I can never settle on a design for myself :S
  • Haha, I know the feeling!
  • part of me wants to design an extravagant fancy site and try to win an awwward for it, then part of me wants to keep it simple

    I should design a bipolar site, so I can change it at the press of a button based on my mood
  • It's certainly harder designing with a set of restrictions in place. I took that approach for my weblog; I wanted readability the focus, and that imposed a set of rules I needed to work within. I really enjoyed the process though, although I am always tempted to make changes to it.

    My advice would be to design for you, rather than for some award that you may or may not win.
  • Ha I didn't mean literally design just for an awwward, but it would be nice
    Why are we more difficult than clients ha