Bizarre SimpleMODAL OSX Actions In Foreach Loop
I am developing on a Wordpress MU website with a PHPBB3 forum that is merged into the site. On the website there is a page that utilizes SimpleModal OSX Style Modal Dialog that que
Solution 1:
The variable $ret does not seem to contain anything?
1- please use ULs around your LIs 2- please use classes instead of IDs
So, I am not very sure what you're trying to achieve with the random number, and I don't know what the overlayId and containerId should refer to, but this looks like a much better way of doing things:
<?php
$ret = roster();
if ( ! empty($ret))
{
foreach($ret as $v)
{ ?>
<div class="roster_container">
<div class="left_col">
<div class="first_left_col">
<h4>Avatar</h4>
<?php echo '<li><img src="' . $v['picture'] . '" alt="" /></li>';?>
</div>
<div class="second_left_col">
<h4>Username</h4>
<?php echo '<li>' . $v['login'] . '</li>';?>
</div>
<div class="third_left_col">
<h4>Rank</h4>
<?php echo '<li>' . $v['rank'] . '</li>';?>
</div>
</div>
<div class="right_col">
<div class="first_right_col">
<h4>Toons</h4>
<ul>
<li>
<div class='osx-modal'>
<?php
$n = rand(10e16, 10e20);
$x = base_convert($n, 10, 36);
?>
<input type="button" name="osx" value="View" class="osx" class="osx"/>
</div>
<div class="osx-modal-content" style="display:none;">
<div class="close"><a href="#" class="simplemodal-close">x</a></div>
<div class="osx-modal-data">
<div class="toon_title">Game Characters</div>
<div class="toon_game">
<?php echo '<h3>' . $v['game'] . '</h3>';?>
</div>
<div class="toon_box">
<div class="toon_name"><?php echo $v['toon_name'];?></div>
<div class="toon_avatar"><?php echo '<img src="' . $v['avatar'] . '" alt="" />';?></div>
<div class="toon_faction"><?php echo $v['faction'];?></div>
<div class="toon_class"><?php echo $v['class'];?></div>
<div class="toon_role"><?php echo $v['role'];?></div>
</div>
<p><button class="simplemodal-close">Close</button></p>
</div>
</div>
</li>
</ul>
</div>
<div class="second_right_col">
<h4>Challenge</h4>
<ul>
<?php echo '<li><a href="#" class="CHALLENGE">Challenge</a></li>';?>
</ul>
</div>
<div class="third_right_col">
<h4>Email</h4>
<ul>
<?php echo '<li><a href="mailto:' . $v['email'] . '"><img src="http://conspirators.websitedesignbyneo.com/wp-content/themes/conspirators/css/dark-red/img/email-icon.gif" style="height:15px;width:20px;margin-top:5px;margin-left:7px;"></a></li>';?>
</ul>
</div>
</div>
</div>
<?php
}
}
?>
<script>
jQuery(function ($) {
var OSX = {
container: null,
init: function () {
$("[name=osx]").click(function (e) {
e.preventDefault();
$(this).parent().next().modal({
overlayId: 'osx-overlay',
containerId: 'osx-container',
closeHTML: null,
minHeight: 80,
opacity: 65,
position: ['0',],
overlayClose: true,
onOpen: OSX.open,
onClose: OSX.close
});
});
},
open: function (d) {
var self = this;
</script>
Post a Comment for "Bizarre SimpleMODAL OSX Actions In Foreach Loop"