/
Inspecting and Copying the Query Selector
Inspecting and Copying the Query Selector
Referencing the query selector of an element from the DOM can be complicated. Why not copy the query selector straight from the page instead?
Instructions
Right-click on the element on the issue UI.
Click on "Inspect".
The DOM will automatically open up and highlight the element in the JavaScript console.
Select and click on the parent element.
Hover over "Copy", then click on "Copy selector".
The query selector changes between the view and edit screens. Copy the query selectors for both.
In the view screen, the query selector copied from the "textField" custom field is: #rowForcustomfield_10301 |
Do the same fore the Edit view:
In the edit screen, the query selector copied from the "textField" custom field is: #qf-field-customfield_10301 |
Hiding and Disabling Custom Fields Based on Selection
Main Script
lfInstantHook("issueType", "LiveFields/hook.sil");
lfWatch("issueType", "issueType", "LiveFields/hook.sil"); |
Hook Script
if (argv["issueType"] == "Task") {
lfExecuteJS("LiveFields/hide.js");
} else if (argv["issueType"] == "Bug") {
lfExecuteJS("LiveFields/show.js");
} |
show.js
AJS.$("#rowForcustomfield_10301").show();
AJS.$("#qf-field-customfield_10301").show(); |
hide.js
AJS.$("#rowForcustomfield_10301").hide();
AJS.$("#qf-field-customfield_10301").hide(); |
Additional Help
Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.
Related articles
Filter by label
There are no items with the selected labels at this time.
, multiple selections available,
Related content
lfExecuteJS
lfExecuteJS
Read with this
Inspecting and Copying the Query Selector
Inspecting and Copying the Query Selector
More like this
Create a custom cascading dropdown field
Create a custom cascading dropdown field
Read with this
Hiding and Showing Custom Fields That Are Not Supported
Hiding and Showing Custom Fields That Are Not Supported
More like this
Fields and graphic elements supported by Live Fields
Fields and graphic elements supported by Live Fields
Read with this
Hiding and Showing Custom Fields That Are Not Supported
Hiding and Showing Custom Fields That Are Not Supported
More like this