I use colorbox jquery and have problem to show variable in colorbox.
I have variable called wp_store_caption that get value from input type :-
<input type="text" id="title" class="ab_form_text wp_store_caption require" name="wp_store_caption" value="">
Now i use colorbox like :-
jQuery(document).ready(function() {
var wp_store_caption = jQuery('#title').val();
jQuery(".open-popup-link").colorbox({html:"<h1>"+wp_store_caption+"</h1>"});
});
But canot show value of wp_store_caption, But when use alert() without colorbox, I can see the value.
Where is problem ?!