0

I'm working with Vodkabears' Remodal in Concrete5, and I'm trying to load a page into the modal by an href. It opens fine the first time, but once closed it won't open again. I've concluded that the issue is with the '.load(href)' but can't figure out a solution. Here's my jquery for when the div is clicked on:

$(".floor-plan").click(function(event){
    event.preventDefault();
    var href = $(this).children('a').attr('href');

    $("[data-remodal-id='modal']").load(href);
    $("[data-remodal-target='modal']").click();
});

and here is the html:

<a href="#" data-remodal-target="modal" style="display: block;"></a>
    <div class="remodal" data-remodal-id="modal">
</div>
J. Chomel
  • 8,193
  • 15
  • 41
  • 69
cmcg182
  • 83
  • 2
  • 9
  • The `.floor-plan` element is inside the response you load with the LOAD function? – Mario Araque Feb 18 '16 at 22:45
  • I'm not quite sure what you're asking, but the floor-plan element has a dynamically generated 'a' tag with an href. When the div is clicked, it will load that href into remodal, rather than hard-coding the content. The floor-plan element is not what being loaded into remodal, it's just the div that calls remodal when clicked. – cmcg182 Feb 19 '16 at 14:30

0 Answers0