Using that doesn't work either. The first word, stops registering the
click event after one click. The only way I found to resolve the issue
is, add the following code to the page:
<span class="hint" style="display:none">Hidden</span>

In this case, Hidden becomes the "first word", so the rest of the page
works with the click event.

Thanks

On Feb 1, 5:33 pm, Ricardo Tomasi <ricardob...@gmail.com> wrote:
> It probably won't make any difference, but why not use the 'click'
> event and 'this'? There is no need to get e.target if there are no
> child elements. Also, if you're doing a POST, why are you using a
> querystring?
>
> $('.hint').click(function(){
>      var clickText = $(this).text();
>      $.post('term.cfc', {method: 'getTermDef', returnFormat: 'json',
> term:clickText}, showHint, "json");
>
> });
>
> Have you tried a simple alert/log function in place of showHint, as a
> check for the event firing?
>
> On Feb 1, 5:33 pm, "shahku...@gmail.com" <shahku...@gmail.com> wrote:
>
>
>
> > So, I am implementing a page on which words that have hints associated
> > in the DB are binded with the click event to show the Hint. Initially,
> > I go through and replace the words with html that goes <span
> > class="hint">word</span>
>
> > So, then I bind the hint class with the click event,
> > $(".hint").bind("mouseup",function(e)
> > {
> >         var clickElement = e.target;
> >         var clickText = $(clickElement).text();
> >         $.post('term.cfc?method=getTermDef&returnFormat=json',
> > {term:clickText},showHint,"json");}
>
> > )
>
> > The problem is on IE 7, the first word that is binded, works fine for
> > the first click, but after that the click event for it is not
> > registered. For the rest of the words, the click event works fine.
>
> > On FF, everything works fine.
>
> > Any ideas on what could be wrong here?- Hide quoted text -
>
> - Show quoted text -

Reply via email to