我正在创建一个显示活动信息的Feed。每个事件都有自己的模态。我正在尝试为每个事件的模态创建一个唯一的URL,但我很难搞清楚链接。
根据我的理解,我应该可以访问网址:
mysite.com/feed.php?result=mymodal'eventid'
哪个应该在页面加载时自动打开该特定模式。正确的吗?
我是所有这一切的新手,可能会遗漏一些小东西,或者可能缺少整个元素。
?>
<div class="result">
<div class="twelve columns">
<h2><a href="#mymodal<?php echo $runrows['eventID']?>" data-reveal-id="myModal<?php echo $runrows['eventID']?>" class="event_title"><?php echo $runrows['title']; ?></a></h2>
<div class="event_date"><?php echo $runrows['date']; ?><p class="rsvp_count">RSVP Count: <?php echo $runrows['rsvp_count']; ?></p></div>
</div>
<div class="twelve columns">
<p class="event_headline"><?php echo $runrows['headline']; ?> (Click on event name to read more..)</p>
<p class="event_location"><?php echo $runrows['location']; ?></p>
<p class="event_terminal"><?php echo $runrows['terminal']; ?></p>
<p class="rsvp_count"><?php echo $runrows['rsvp_count']; ?></p>
<div class="event_share">
<form style='margin: 0; padding: 0'>
<?php/*input class="button" style='display:inline;' name='RSVP' type='submit' value='RSVP'/>
<input class="button" style='display:inline;' name='Share' type='submit' value='Share'/>
<input type="hidden" name="eventID" value="1"*/?>
</form>
<button onclick="<?php echo 'RSVPSubmit('.$runrows['eventID'].', 0);'; ?>">RSVP</button><button>Share</button>
</div>
</div>
<hr>
</div>
<div id="myModal<?php echo $runrows['eventID']?>" class="reveal-modal">
<div class="result">
<div class="twelve columns">
<h2><a href="#mymodal<?php $runrows['eventID']?>" data-reveal-id="myModal<?php echo $runrows['eventID']?>" class="event_title"><?php echo $runrows['title']; ?></a></h2>
<div class="event_date"><?php echo $runrows['date']; ?></div>
</div>
<div class="twelve columns">
<p class="event_headline"><?php echo $runrows['headline']; ?></p>
<p class="event_description"><?php echo $runrows['description']; ?></p>
<p class="event_location"><?php echo $runrows['location']; ?></p>
<p class="rsvp_count"><?php echo $runrows['rsvp_count']; ?></p>
<div class="event_share">
<form style='margin: 0; padding: 0'>
<?php/*input class="button" style='display:inline;' name='RSVP' type='submit' value='RSVP'/>
<input class="button" style='display:inline;' name='Share' type='submit' value='Share'/>
<input type="hidden" name="eventID" value="1"*/?>
</form>
<button onclick="<?php echo 'RSVPSubmit('.$runrows['eventID'].', 0);'; ?>">RSVP</button><button>Share</button>
</div>
</div>
<hr>
</div>
<a class="close-reveal-modal">×</a>
</div>
答案 0 :(得分:0)
请参阅php in foundation modal(我之前的回答),了解基金会揭晓的工作方式。
请检查您的代码并确保实际揭示/模态是</body>
之前的元素(不包括<scripts>
)。