Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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).

share|improve this answer
    
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. –  guisasso Jan 7 '13 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 '13 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. –  w3d Jan 8 '13 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. –  w3d Jan 8 '13 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. –  guisasso Jan 8 '13 at 12:58
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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