Customo field is not working inside jquery code.
-
function custom_js(){ ?> <?php $skill_value = update_post_meta($post->ID, 'skill_value', 19) ?> <script> var myCircle = Circles.create({ id: '<?php the_ID(); ?>', radius: 80, value: <?php if($skill_value) : ?> <?php echo $skill_value; ?> <?php else : ?> 19 <?php endif; ?>, maxValue: 100, width: 10, text: function(value){return value + '%';}, colors: ['#D2D4D8', <?php $skill_color = get_post_meta($post->ID, 'skill_color', true) ?> <?php if($skill_color) : ?> <?php echo $skill_color; ?> <?php else : ?> '#4862A3' <?php endif; ?> ], duration: 400,wrpClass: 'circles-wrp',textClass: 'circles-text' }) ; </script> <?php } add_action('wp_footer', 'custom_js');When, i try to change value through “skill_value” or “skill_color” the value is not changed.
It all time showing default value…
please help..
The topic ‘Customo field is not working inside jquery code.’ is closed to new replies.