0

I display a text extendable, when I click on it, it shows all the text.
When I click again, it shrinks. It works fine.

But if I have a link text inside the text , let's say www.google.com, I cannot click on it.

Here is the generated code

<div class="messageWrapper">


        <img src="webroot\img\cake.icon.png" alt="Smiley face" height="42" width="42"> 

        <a href="/contest/users/view/11">toto2</a>

        Test  <a href="http://hotmail.com" rel=nofollow>http://hotmail.com</a> test on clickable text within clickable zone 

                </br></br>

  </div>  

Is anyone has an idea?

4

1 回答 1

0

我找到了解决方案,

我为文本的每个 url 区域提供了一个类,例如:

<a href="http://hotmail.com"  class='insideLink' rel=nofollow>http://hotmail.com</a> test blablablab...

我在我的脚本中添加了以下 jquery 命令

$('.insideLink').click(function(event){
        event.stopImmediatePropagation();
    });
于 2013-08-24T08:16:55.430 回答