0

我想要的是,当我点击单选按钮时,它会将我带到下一页,而我实际上并没有点击下一页。
目前我必须点击下一页

申请表链接:http: //goo.gl/CNgJq

我已经编写了这段代码,但它似乎不起作用:

(function ($, Drupal, window, document, undefined) {
    $(document).ready(function() {
        $('.form-radio').click(function() {
            $('.next-tab mover').click();
        });
    });
})(jQuery, Drupal, this, this.document); 

谁能告诉我这段代码我做错了什么?

4

3 回答 3

0

你可以试试这个

$('.form-radio').on('click', function() {
    $('.next-tab.mover').trigger('click);
});
于 2013-07-11T16:27:05.757 回答
0

查看您的页面,您需要将选择器更改为$('.next-tab.mover'). 这将找到同时具有next-tabmover类的元素。

$('.form-radio').click(function() { $('.next-tab.mover').click(); });
于 2013-07-11T16:14:08.327 回答
0

测试用例:http: //jsbin.com/acopuj/1/edit

$('.next-tab mover') // <---- that's wrong

应该:

$('.next-tab.mover') // the button has both classes, add '.' and remove 'space'
于 2013-07-11T16:07:44.580 回答