When using javascript in custom field to display red, initially it is black and after sometime, it's become red.
It should be red initially , rather than black.
Any idea?
Here is my code.
<script type='text/javascript'>
AJS.$(document).ready(function() {
AJS.$("#customfield_113").css("color", "red");
}
);
That's the downside of using javascript. You have to wait for the resources to be loaded and executed. In your case, i think it would be easier to just put that in a stylesheet if there are no other conditions to check.
Hi Florin
Here is my complete code!!
Suggest appropriate methods are highly welcome
<script type="text/javascript">
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
callFunction();
});
callFunction();
function callFunction(){
AJS.$("#customfield_113").css("color", "red");
AJS.$("#rowForcustomfield_113").addClass("item item-right");
}
</script>
Can we write in separate file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe you can put color : red in a stylesheed included by your plugin. The classes however cannot, unless that customfield is built in-house.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They are custom field. I want to view that field in right hand side as well.
Any idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I belive that script is as good as it can get.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only issue is - initially shown in left hand side and then right.
Any input from your side??
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.