You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
I'm trying to figure out how to inject a string into the portion in bold: "jQuery(".label_to_add").click(function(){". This macro currently work injecting a label to the page by click of a button; however, if more than one page with this macro is included into another, the ".label_to_add" triggers the scripts in multiple pages. I need to make each of these scripts unique.
Thanks
-------------------------------
## @Param 0:title=Label to add|type=string|desc=Label of interest
## @Param 1:title=Button description|type=string|desc=Text to display on button
<script>
AJS.toInit(function ($) {
jQuery(".label_to_add").click(function(){
jQuery.post(contextPath+"/json/addlabelactivity.action", {"entityIdString": "$content.id", "labelString": jQuery(this).val(), "atl_token": jQuery("#atlassian-token").attr("content") },function(){
window.location.reload();
});
});
});
</script>
<button class="label_to_add" type="submit" color="#0" value=$param0>$param1</button>
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events