Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence Create Space Dialog JQuery

Nad August 27, 2021

Im trying to change the "Create Space" link in the navigation bar to become a hyperlink that goes to a website, however, when you click Create Space it opens up a dialog box.

 

i've tried using this but it doesnt seem to do anything

 

AJS.toInit(function () {
AJS.$("#create-space-header").on( "click", function() {
AJS.$("#create-dialog").dialog("close");
});
});

1 answer

0 votes
Nad August 31, 2021

I ended up using the below to redirect the "Create New Space" link to do a different location, however, it's not loading on the first on click, the 2nd subsequent click of the same item works.

<script>
AJS.toInit(function() {
AJS.$("#space-menu-link").on("click", function() {
AJS.$("#create-space-header").click(function() {
window.location.href = "https://google.com";
});
});
});
</script>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events