Javascript 打开引导模式并获取数据的Laravel HTML链接

Javascript 打开引导模式并获取数据的Laravel HTML链接,javascript,twitter-bootstrap,laravel,Javascript,Twitter Bootstrap,Laravel,我想有一个Laravel HTML链接,它在同一页面上打开一个引导模式,并从链接中的ID获取数据。类似于在Twitter上单击推文时发生的情况 现在,我只能让它在新的一页上打开 blade.php: {!! Html::linkAction('ContentController@getImages', 'Screenshots', array($row->ID), array('class' => 'trigger')) !!} Route::get('screenshots/{i

我想有一个Laravel HTML链接,它在同一页面上打开一个引导模式,并从链接中的ID获取数据。类似于在Twitter上单击推文时发生的情况

现在,我只能让它在新的一页上打开

blade.php:

{!! Html::linkAction('ContentController@getImages', 'Screenshots', array($row->ID), array('class' => 'trigger')) !!}
Route::get('screenshots/{id}', 'ContentController@getImages');
$(document).ready(function() {
    $('.trigger').on('click', function() {
        $(window).scroll(function() {
            clearTimeout($.data(this, 'scrollTimer'));
            $.data(this, 'scrollTimer', setTimeout(function() {
                $('#myModal').modal('show');      
            }, 250));
            $(this).unbind('scroll');
        });
    });
});
routes.php:

{!! Html::linkAction('ContentController@getImages', 'Screenshots', array($row->ID), array('class' => 'trigger')) !!}
Route::get('screenshots/{id}', 'ContentController@getImages');
$(document).ready(function() {
    $('.trigger').on('click', function() {
        $(window).scroll(function() {
            clearTimeout($.data(this, 'scrollTimer'));
            $.data(this, 'scrollTimer', setTimeout(function() {
                $('#myModal').modal('show');      
            }, 250));
            $(this).unbind('scroll');
        });
    });
});
screenshots/{id}
是另一个页面。我想在同一页面上打开引导模式,即
content/{year}/{category}

js:

{!! Html::linkAction('ContentController@getImages', 'Screenshots', array($row->ID), array('class' => 'trigger')) !!}
Route::get('screenshots/{id}', 'ContentController@getImages');
$(document).ready(function() {
    $('.trigger').on('click', function() {
        $(window).scroll(function() {
            clearTimeout($.data(this, 'scrollTimer'));
            $.data(this, 'scrollTimer', setTimeout(function() {
                $('#myModal').modal('show');      
            }, 250));
            $(this).unbind('scroll');
        });
    });
});
我已经用一个标准的HTML链接对此进行了测试,它打开了引导模式fine。

可能重复的可能重复的