Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using qtip with jQuery validation framework
18th December, 07:04
Post: #1
Using qtip with jQuery validation framework
Hi Craig et al,

I was hoping to get some help with a problem I've been struggling with most of today. I'm trying to replace the jQuery validation frameworks error messages with qtip. Using the following setup:

JS Code
$('form:first').validate({
                errorClass: "errormessage",
                onkeyup: false,
                success: function(error, element) {
                   <span style="font-style: italic;"> // trying to destroy element.qtip here</span>
                },
                errorPlacement: function(error, element) {
                    element.qtip(
                        {
                            show: { solo: true },
                            content: eval(error),
                            style: { width: 200, padding: 5, background: 'Red', textAlign: 'center', border: { width: 5, radius: 5, color: 'Red' }, tip: 'bottomLeft' },
                            position: {
                                corner: { target: 'topRight', tooltip: 'bottomLeft' }
                            }
                        });
 
                }
            })


I've been able to successfully display the errormessages in tooltips next to my textboxes ( and it looks great), however struck a problem when the user corrects the error. Although the errormessage (red-border) styling is removed the qtip remains active on hover. Usually this takes the form of an empty qtip.

My approach to attacking this has been to try and destroy/unbind/hide the qtip on validation 'success', however every method I've used has no effect and the qtip remains.

Any pointers appreciated, Cheers.

Sean
Find all posts by this user
Quote this message in a reply
18th December, 13:56
Post: #2
Using qtip with jQuery validation framework
Mutleyoz, have you tried simply selecting all form elements without the .errormessage class and calling a destroy on them?

JS Code
$('form:first input:not(.errormessage)').qtip('destroy')

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
9th June, 08:23
Post: #3
RE: Using qtip with jQuery validation framework
Hello

I'm stuck with the exact same problem, did you ever get resolved ?

I would really appreciate if you could show me your solution.


Thanks in advance !
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  the plugin do not work correctly with jquery 1.7? vic906 1 148 12th April 22:09
Last Post: Craig
  Qtips with jquery UI Issue sherwoodbear79 2 439 15th February 15:36
Last Post: sherwoodbear79
  [Solved] Need some help:codes in Jquery BabyShung 1 341 29th January 16:35
Last Post: Craig
  Tooltips not loading jQuery or other js files from parent document crodesign 2 478 13th January 22:19
Last Post: crodesign
  qtip with jquery mobile tap event finedesignz 1 647 4th January 21:18
Last Post: Craig
  qtip inside the jquery UI Dialog tiggi 1 784 20th October 18:49
Last Post: Craig
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 13,029 18th October 07:22
Last Post: jokepondy
  Cannot make jquery plugin or qtip plugin work anindasen 3 986 8th October 13:49
Last Post: Craig
  [Solved] qTip input fields validation not working with display:none Maverick 6 1,414 25th July 16:44
Last Post: Maverick
  post ajax from qtip2/validation form jquerynewb 4 1,346 14th July 08:19
Last Post: Craig



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