Load picture gallery in jQuery dialog

<script type=”text/javascript”>
$(document).ready(function() {

$(‘.pic_gallery’).click(function() {
// console.log($(this).attr(‘id’).substr(5));
//change dialog iframe id href
url = “{{ URL::to(‘/picture/list’)}}” + “/” + $(this).attr(‘id’).substr(5);
//  console.log(‘url: ‘ + url);
$(“#dialog_iframe”).attr(“src”, url)
$(“#dialog”).dialog(“open”);

//simple page load
// $(“#dialog2”).load(url);
//  $(“#dialog2”).dialog(“open”);
});

$(“#dialog”).dialog({
autoOpen: false,
position: ‘center’,
title: ‘EDIT’,
draggable: true,
width: 700,
height: 450,
});

});
</script>

<div id=”dialog” style=”display:none;” title=”Dialog Title”><iframe id=”dialog_iframe” frameborder=”0″ scrolling=”no” width=”650″ height=”400″ src=””></iframe></div>

******
<a class=”pic_gallery” id=”link_{{$user->users_id}}” href=”#” > Click gallery </a>

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress