How can I inject the button class or ID into jQuery? Example below, button class $abcde. I'd like to use that for jQuery($abcde).click(function(){
<button class=$abcde type="submit" value=$paramLabel>$paramButtonCaption</button>
<script>
AJS.toInit(function ($) {
jQuery($abcde).click(function(){
jQuery.post(contextPath+"/json/removelabelactivity.action", {"entityIdString": "$content.id", "labelIdString": jQuery(this).val(), "atl_token": jQuery("#atlassian-token").attr("content") } ,function(){
window.location.reload();
});
});
});
</script>
figured it out, jQuery("." + "$abcde").click
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.