This is a cross browser tested FAQ example. The browsers included in testing where Safari, Firefox, Chrome, IE7, IE8 and IE9.
To test, click on each FAQ questions and it should slide open the answers and slide close any another FAQ answers showing. Clicking on the open FAQ question is disabled.
The JQuery methods used are addClass
, removeClass
, hasClass
, is
, slideUp
, slideDown
, css
and ready
Also the JQuery events click
and hover
are used.
We also make use of the css cursor
property’s auto
and pointer
values.
We also make use of the css cursor
property’s auto
and pointer
values.
This is intended as a challenging example for beginning learners of Javascript and JQuery. This is a fully working application that can serve as a template for other projects.
This is the index.html file. The script
element on line 7 is preferred but should only beused if you are viewing the file using the http
or https
protocols in the web browser address line.
Line 8 is used because your may be loading the index.html file from your local folder. In this case web browsers may not allow the access due to security. So the https
must be included to avoid that problem.
This is the site.css style sheet.