jQuery Selectors: how to access an a tag, whose span has a specific class?

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-04-08T16:00:51Z Indexed on 2010/04/08 16:03 UTC
Read the original article Hit count: 295

I'm messing around with FullCalendar jQuery calendar, and qTips, so that I can display more information about the event upon mouseover.

I've added a summary element to the FullCalendar js, and also my server code.

I then added a new qTip in the eventMouseover method, based on the span class, which works prefectly. However, if the event stretches over a couple of days, the qTip only works (because it is a span tag), on the text itself, not the entire blue strip.

What I want to do is to assign the qTip to the a tag, and make the a tags display block.

This works currently:

        eventMouseover: function(event){
            $('span[class=fc-event-title]').each(function() {
                if( $(this).text() == event.title )
                {
                    $(this).qtip({
                        content: event.summary,
                        style: 
                        { 
                            border: 
                            {
                                width: 1,
                                radius: 5,
                                color: '#6699CC'
                            },
                            width: 200
                        }  
                    });

                }
            });

but I can't figure out how to select the a tag where it contains a span with class of fc-event-title.

Many thanks for any assistance.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins