Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Style Update on validation
25th July, 06:08 (This post was last modified: 25th July 06:09 by ni8hood.)
Post: #1
[Solved] Style Update on validation
Hi
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?
Find all posts by this user
Quote this message in a reply
25th July, 11:45
Post: #2
RE: Style Update on validation
JS Code
jQuery.validator.setDefaults({
	errorPlacement: function(error, placement) {
		$(placement).qtip('api').updateContent(error.text()).updateStyle('red');
	}
});

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How to global a style for each qtip method? kmvan 1 989 25th September 13:28
Last Post: Craig
  [Solved] qTip and jQuery Validation QandnotU 2 3,196 17th November 10:55
Last Post: Paté
  Style by element class, content by element id teeks 14 5,656 15th November 21:35
Last Post: garbledygook
  qTip Position and Style Adjustments cohlerm 1 1,261 25th August 17:09
Last Post: Craig
  something like style { tip: "auto" } nemoluca 3 1,151 15th April 16:27
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)