25th July, 06:08
Hi
How can i update the style and contents of the qtip?
I have this script for normal qtip on pageload.
On submitting form, this script runs and updates the content, at the same time i want to update the style to red and qtip has to stay on the page.
what changes i need to make in the above code for that?
How can i update the style and contents of the qtip?
I have this script for normal qtip on pageload.
JS Code
$(document).ready(function(){
$(".text-input").qtip({
content: "enter correct values",
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftMiddle'
}
},
style: {
tip: true,
name: 'green'
}
});
$("#order_form").validate(
);
});
On submitting form, this script runs and updates the content, at the same time i want to update the style to red and qtip has to stay on the page.
JS Code
jQuery.validator.setDefaults({
errorPlacement: function(error, placement) {
$(placement).qtip('api').updateContent(error.text());
}
});
what changes i need to make in the above code for that?