2

I'm working on displaying a hidden div when clicked on for a website. This would be a contact for to request more information about a product, so, its a very important form.

So, i came across the following (demo) http://papermashup.com/demos/jquery-show-hide-plugin/

(Code) - http://papermashup.com/jquery-show-hide-plugin/

Which works great, and uses jquery. With a couple of modifications would be a perfect fit for the application I'm working at.

There's only one problem: On Safari (argh!), the animation looks choppy.

So I have 2 questions:

1 - For the more experienced webmasters, is it a good practice to use java script to display such and important part of this website? Could I run into problems? I know that java script could be disabled, but is that even realistic? Should I perhaps find a different solution?

2 - Is there a way to improve the animation so it works better on Safari, or should I just go a different route?

1 Answer 1

1

If a form is very important then the best practice is not to hide it all. Don't make your users think, don't make them work to give you the important information you need to keep the interaction going. Not hiding it removes the need for the animation so it's two birds with one stone.

If you simply must hide it, I would not use sliding panels per the demo. Instead, I would look into creating a modal overlay with JQuery that could be summoned in a variety of ways (onclick, timed, etc).

8
  • That's good advice, and a good way of looking at it. But I'm moving from having the user going to a different page altogether and writing what they want, to have it pre-selected in that div, so in my conception, I'm improving already, but I see how a person coming to the page for the first time wouldn't see it that way. Thanks for the advice. Jan 7, 2013 at 18:24
  • Thanks. We always get focused on our incremental improvements and sometimes lose the big picture. I know I'm regularly guilty of this. Underscores why combining good design with UAT is so very, very important!
    – JCL1178
    Jan 7, 2013 at 18:28
  • 1
    @guisasso: No, "JavaScript should be used to hide the element initially" - if JavaScript is not available then the element would be visible (its default state before JavaScript is applied). "average user", read "average user to your website". Well, some users have said they disable JavaScript and run "no script" browser extensions (maybe check the download stats for "noscript"?), although these are generally your techy-types and I can't honestly say how common this is.
    – MrWhite
    Jan 8, 2013 at 8:24
  • 1
    @guisasso: ... Then there is also the situation when JavaScript simply isn't available on the device (or lacking full support); it's not a case of it being "disabled". This used to be the case more with mobile devices, but this is becoming less of an issue i this area. If you are coding for search engines then you assume no JavaScript. If you code "unobtrusively" with "progressive enhancement" in mind then you don't need to worry.
    – MrWhite
    Jan 8, 2013 at 8:33
  • 1
    @w3d Just would really like to thank you. I followed your advice, and made sure that if java is disabled, the div is shown by default by hiding it within java. I never knew much about java but, "coding unobtrusively" was one of the best advices I ever got here. Thanks. Jan 8, 2013 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.