jQuery Hide / Show

Inserts an accessible buttons/links to hide and show sections of content.

Example A

An example with the default options.

Text content to be hidden text content to be hidden text content to be hidden text content to be hidden

Initialisation


$(".exampleA").hideShow();

Example B

An example with the trigger element inserted into a different location.

Text content to be hidden text content to be hidden text content to be hidden text content to be hidden

Initialisation


$(".exampleB").hideShow({
    insertMethod: 'after',
    insertTriggerLocation: '.exampleB_heading'
});

Example C

An example using an existing element on the page as the trigger element.

Contact details

Inserts an accessible buttons/links to hide and show sections of content.

Initialisation


$(".exampleC").hideShow({
    speed: '600',
    state: 'hidden',
    triggerElementTarget: '#triggerC'
});

Example D

An example that closes the content when clicking elsewhere in the document.

The content must have been opened up through a trigger press or click for this to work.

Closes on click elsewhere in the document.

Initialisation


$(".exampleD").hideShow({
    closeOnClick: true
});

Public methods

Text content to be hidden text content to be hidden text content to be hidden text content to be hidden

Contact details

Telephone 01234 567 890

Email test@test.com