Need help?

Contact SCC

Email scicomp
Join #scicomp on Slack

Help us help you

Follow these guidelines when submitting a help request.

You are here: System » JQueryPlugin » JQueryFocus

JQueryFocus

11 Feb 2025 - 15:05 | Version 1 |

Homepage: http://foswiki.org/Extensions/JQueryPlugin
Author(s): Michael Daum
Version: 1.0.1

This plugin sets the focus on a form input field or textarea of a form when the page is loaded.

Usage

Add the css class jqFocus (or foswikiFocus) to the input field you'd like to focus.

Example

%JQREQUIRE{"focus"}%
<input type="text" class="foswikiInputField jqFocus" size="40" />

<style>
input[type="text"]:focus {
   background-color:#FFFFC0;
   color:black;
}
</style>

creates:

Copyright © Simons Foundation. All material on this collaboration platform is the property of the Simons Foundation.
This website is using cookies. More info. That's Fine