From the reference libraryRedM

autodoc_client_functions

jo_libs/modules/nui/autodoc/autodoc_client_functions.md

autodoc_client_functions

JO Functions > jo.nui.forceFocus()

Forces focus on a specific NUI interface and don't spread events to other NUIs <br>

JO Functions > jo.nui.forceFocus() > Syntax

jo.nui.forceFocus(uiName)

JO Functions > jo.nui.forceFocus() > Parameters

uiName : string

The name of the NUI to focus on

JO Functions > jo.nui.forceFocus() > Example

jo.nui.forceFocus('my_crew_hud')


JO Functions > jo.nui.isHovering() > Syntax

jo.nui.isHovering(global)

JO Functions > jo.nui.isLoaded()

A function to know if a nui is loaded <br>

JO Functions > jo.nui.isLoaded() > Syntax

jo.nui.isLoaded(uiName)

JO Functions > jo.nui.isLoaded() > Parameters

uiName : string

The name of the NUI

JO Functions > jo.nui.isLoaded() > Return Value

Type : boolean

true if the nui is already loaded

JO Functions > jo.nui.isLoaded() > Example

local isLoaded = jo.menu.isLoaded('my_crew_hud')
-- Expected output: `true` is the nui is loaded, else `false`

JO Functions > jo.nui.load() > Syntax

jo.nui.load(uiName, url)

JO Functions > jo.nui.load() > Parameters

uiName : string

The name of the NUI to load

url : string

The URL of the NUI to load

JO Functions > jo.nui.load() > Example

local uiName = "my_crew_hud"
local url = "nui://myResource/folder/index.html"
jo.nui.load(uiName, url)


JO Functions > jo.nui.resetFocus()

Resets the focus from any NUI interface and spread events <br>

JO Functions > jo.nui.resetFocus() > Syntax

jo.nui.resetFocus()

JO Functions > jo.nui.resetFocus() > Example

jo.nuit.forceFocus('my_crew_hud')
Wait(10000)
jo.nui.resetFocus()
Back to documentation