Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
nested tooltip for li and need to derive ID of li
30th January, 16:22 (This post was last modified: 30th January 16:24 by Ville.)
Post: #1
nested tooltip for li and need to derive ID of li
Hi,

I have a nested qTip that is calling:

JS Code
$(('#' + id)).qtip({
                           content: majorTip,
                           show: {
                              solo: true,
                              when: {
                                 target: $(('#' + id)),
                                 event: 'mouseover'
                              }
                           },
                           hide: {
                              fixed: true,
                              when: {
                                 target: $(('#' + id))
 
                              }
                           },
                              api: {
                              onRender: function(){
                                  // Second qTip call which searches for li items 
                                  this.elements.content.find('li').qtip({
                                     show: {
                                        solo: true,
                                        when: {
                                           target: this.id //<<<Right here, I need to get the id
                                        }
                                     },
                                     hide: {
                                        fixed: false,
                                        when: {
                                           target: this.id //<<<<same here
                                        }
                                     },
                                       position:{
                                       corner: {
                                          tooltip: 'leftMiddle',
                                          target: 'rightMiddle'
                                       }
                                    }
                                  });
                               }//end onRender
                              }//end api:                              
                        })//end qtip call


My li elements have individual IDs, but I can't figure out how to get those ids to go into the show and hide.

thank you for such a great product and for continuing support!
Find all posts by this user
Quote this message in a reply
31st January, 16:43
Post: #2
nested tooltip for li and need to derive ID of li
whitener, in order to use individual attributes of each element within a qTip call, you'll need to use an each() loop instead e.g.:

JS Code
$('li').each(function(){
   $(this).qtip({
      content: $(this).attr('id')
   }
});

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
2nd February, 13:48
Post: #3
nested tooltip for li and need to derive ID of li
Hi,

I am Keval i am new in qTip. I don't know how to implement tool tip whith <a></a> tag can u help me.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  nested qtip or a qtip inside another qtip uberman 4 2,120 20th July 18:12
Last Post: logan



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