Please Log-in or Register to get full access to the forums.


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qtip error message positioning within jquery ui accordion
22nd August, 11:34 (This post was last modified: 22nd August 11:36 by hellman666.)
Post: #1
qtip error message positioning within jquery ui accordion
Hi everyone,

For a project I am using the jQuery UI Accordion in combination with MVC4. Parts of a form are divided over several tabs within the accordion and I am using qtip to show validation errors on the fields that are not correctly filled with data.

Now everything works like a charm, except for 1 thing... when a qtip validation error is shown next to one of the form fields and I am collapsing one of the accordion tabs while this error message is active, then the qtip message does not move with the form field (that is changing position because of the accordion tab collapsing).

How can I make sure that a qtip error tooltip sticks to this input field? I want to have the qtip move with the form field.

I can't seem to figure it out :/

Best regards,
Martijn

edit: sorry, this post belongs in the qtip2 section in stead of qtip1.x :/
Find all posts by this user
Quote this message in a reply
10th December, 19:04
Post: #2
RE: qtip error message positioning within jquery ui accordion
I'm having the same trouble... qTip2 and jQueryUI Accordion. Collapsing the accordion doesn't impact the visible tooltips.

I'm searching thru the accordion docs to see if there's a way that i can fire a "destroy" on the tooltips on collapse, but so far I've not been able to get anything working.

Curious if anybody's run into this and possibly has a solution?
Find all posts by this user
Quote this message in a reply
11th December, 18:33
Post: #3
RE: qtip error message positioning within jquery ui accordion
(10th December 19:04)charliegriefer Wrote:  I'm having the same trouble... qTip2 and jQueryUI Accordion. Collapsing the accordion doesn't impact the visible tooltips.

I'm searching thru the accordion docs to see if there's a way that i can fire a "destroy" on the tooltips on collapse, but so far I've not been able to get anything working.

Curious if anybody's run into this and possibly has a solution?

Ended up adding the following to my accordion code:

JS Code
change: function( event, ui ) {
	// hide any visible tooltips
	$( "div[ id^=ui-tooltip- ]" ).hide();
 
	// for the newly expanded section, show any currently hidden tooltips
	var inputs = ui.newHeader.first().next( "div" ).find( "input,textarea" );
 
	$.each( inputs, function( index, value ) { 
			var this_id = $( value ).attr( "id" );
			$( "#ui-tooltip-" + this_id ).show();
			$( "#ui-tooltip-" + this_id ).children().show();
	});
}


We're still on jQuery UI 1.7, not sure that "change" is a valid event in 1.9, but this works for us for now.

On change, any visible tooltips are hidden. ui.newHeader is a reference to the section of the accordion that has been opened, so I loop over text inputs and textareas in that section, showing any tooltips that were previously hidden for that section.

Not 100% sure that the 2nd call to children() is done in the most efficient manner, but again, it works. Open to suggestions if there is a better way.[/code]
Find all posts by this user
Quote this message in a reply
12th December, 08:13
Post: #4
RE: qtip error message positioning within jquery ui accordion
If you know the selector that the qTip's are bound to, why not jsut call .qtip('hide') on it?
JS Code
activate: function(event, ui) {
	$('.selector', ui.oldPanel).qtip('hide');
}
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
  Modal/Error Tip Conflict: Cannot read property 'show' of null aj_zo 0 6 Today 13:47
Last Post: aj_zo
  bug? show and hide effects impact positioning? Darek 0 81 21st October 21:12
Last Post: Darek
  Possible Bug: Error with show/hide and mousing over overlapping divs asdexter 4 604 9th October 00:26
Last Post: asdexter
  [Solved] ToolTip positioning Gowtham 2 286 16th July 16:58
Last Post: Gowtham
  Apply jquery on qtip content, or perhaps other plugins atieh 2 330 21st May 20:03
Last Post: atieh
  [Solved] I need some help with positioning. mulamuça 3 396 13th May 13:21
Last Post: Craig
  [Solved] problem with jQuery effect Mpa4Hu 3 361 26th April 12:29
Last Post: Mpa4Hu
  Jquery draggable show qtip while being dragged iknowyou 0 485 28th February 04:11
Last Post: iknowyou
  [Solved] Qtip2 upgrade issues with jquery 2.0.1 version nicck 2 635 25th February 18:26
Last Post: Craig
  I don´t get to run jQuery fullcalendar with qTip elby 0 572 10th February 12:03
Last Post: elby



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