Hi.
When I put this code in the announcment banner it works (alert happens - Object).
<script type='text/javascript'>
jQuery().ready(function() {
alert($( "#ghx-column-header-group" );
});
</script>
When I put this code in the announcment banner it does not (alert does not happen)
<script type='text/javascript'>
jQuery().ready(function() {
$( "#ghx-column-header-group" ).each(function() {
alert(1);
});
});
</script>
What are the limits of putting javascript or jquery in the announcment banner.
I use jira server v8.1.0
If I put this style in the announcement banner, the colors are applied:
<style>
#ghx-column-header-group
{
background-color: red;
}
</style>
When I put this js (which should have the same result) it doesnt:
<script type='text/javascript'>
AJS.$(document).ready(function() {
AJS.$('#ghx-column-header-group').css("background-color","red");
});
</script>
I have tried more, it seems like some objects are not visible to jquery.
If I run this code:
<script type='text/javascript'>
AJS.$(document).ready(function() {
alert(0);
AJS.$('#page').each(function(){
alert(1);
});
alert(2);
});
</script>
All 3 alerts will work (#page is a top level div)
But if I do the same of some deeper element like this:
<script type='text/javascript'>
AJS.$(document).ready(function() {
alert(0);
AJS.$('#ghx-pool-column').each(function(){
alert(1);
});
alert(2);
});
</script>
I only get alert 0 and 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.