为什么点击div不会自动点击标签

时间:2015-05-12 10:54:15

标签: javascript jquery html css razor

我正在使用MVC-5,在我的视图中,我有一些水平排列的div,在每个div下面我都有标签。 每个div的排列方式都包含它下面的标签。

现在我要做什么? 我必须点击div,点击div后必须自动点击它下面的标签。(我不想手动)

我尝试这样做:

我创建了一个div的Onclick事件,我已经为该标签分配了ID   但问题是选项卡永远不会点击相应的 div

我这样做的代码是:

<IfModule mod_rewrite.c>
RewriteEngine On

#RULE IMPORTED RULE 2 

RewriteRule ^error/(.*)$ error.php?p=$1 []

#RULE IMPORTED RULE 4 

RewriteRule ^Administratie/backup/(.*)$ admin.php?    p=dash&pagina=backup&table=$1 []

#RULE IMPORTED RULE 5 

RewriteRule ^Administratie/chatlogs_popup/(.*)$ admin.php?    p=chatlogs_popup&speler=$1 []

#RULE IMPORTED RULE 6 

RewriteRule ^Administratie/berichtenbalk/verwijder/(.*)$ admin.php?p=dash&pagina=berichtenbalk&id=$1 []

#RULE IMPORTED RULE 7 

RewriteRule ^Administratie/(.*)$ admin.php?p=dash&pagina=$1 []

#RULE IMPORTED RULE 8 

RewriteRule ^(.*)$ index.php?p=$1 []

#RULE IMPORTED RULE 9 

RewriteRule ^team/(.*)$ index.php?p=team&staff=$1 []

#RULE IMPORTED RULE 10 

RewriteRule ^forum/categorie/(.*)/topic/(.*)$ ./index.php?p=forum&id=$1&topic=$2 []

#RULE IMPORTED RULE 11 

RewriteRule ^forum/categorie/(.*)$ ./index.php?p=forum&id=$1 []

#RULE IMPORTED RULE 12 

RewriteRule ^helptool/ticket/(.*)$ ./index.php?p=helptool&id=$1 []

#RULE IMPORTED RULE 13 

RewriteRule ^helptool/(.*)$ ./index.php?p=helptool&pagina=$1 []

#RULE IMPORTED RULE 14 

RewriteRule ^groep_overzicht/favoriet/(.*)$ ./index.php?p=groep_overzicht&favo=$1 []

#RULE IMPORTED RULE 15 

RewriteRule ^groep_overzicht/wordlid/(.*)$ ./index.php?p=groep_overzicht&lid=$1 []

#RULE IMPORTED RULE 16 

RewriteRule ^bank/(.*)$ index.php?p=bank&rekening=$1 []

#RULE IMPORTED RULE 17 

RewriteRule ^nieuws/(.*)/p/(.*)$ ./index.php?p=nieuws&id=$1&pagina=$2 []

#RULE IMPORTED RULE 18 

RewriteRule ^nieuws/(.*)$ ./index.php?p=nieuws&id=$1 []

#RULE IMPORTED RULE 19 

RewriteRule ^pagina/(.*)/quote/(.*)$ ./index.php?p=pagina&naam=$1&quote=$2 []

#RULE IMPORTED RULE 20 

RewriteRule ^pagina/(.*)$ ./index.php?p=pagina&naam=$1 []

#RULE IMPORTED RULE 21 

RewriteRule ^meldingen/id/(.*)$ ./index.php?p=meldingen&extra=id&id=$1 []

#RULE IMPORTED RULE 22 

RewriteRule ^minimail/(.*)$ ./index.php?p=minimail&extra=$1 []

#RULE IMPORTED RULE 23 

RewriteRule ^client/id/(.*)$ index.php?p=client&roomid=$1 []

#RULE IMPORTED RULE 24 

RewriteRule ^groups/(.*)/id$ ./index.php?p=groep&id=$1 []

#RULE IMPORTED RULE 25 

RewriteRule ^botsbeheer/(.*)$ ./index.php?p=botsbeheer&id=$1 []

</IfModule>

我的两个警告信息弹出窗口,但它没有点击我点击的这个div下面的标签。

如何实现目标?

1 个答案:

答案 0 :(得分:-1)

我只是通过这样做来解决我的问题:

 function activeCircleClick(el)
    {
        $('#tab1').bind('click', function () { });
        $('#tab1').trigger('click');
    }