Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

leanModal.js - Simplest jQuery Modal Script Troubleshooting

Man oh man. After slaving over leanModal, the simplest possible Modal Window script, for many hours, I still can't get it to trigger.

leanModal: http://leanmodal.finelysliced.com.au

My site: http://wlvrtn.com/sites/nms-leanmodal/

Help a jQuery noob out?


HEAD:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="_/js/jquery.leanModal.min.js"></script>
<script type="text/javascript">
        $(function() {
            $('a[rel*=leanModal]').leanModal({ top : 200, closeButton: ".modal_close" });       
        });
</script>

CSS:

#lean_overlay {
position: fixed;
z-index: 10000;
top: 0px;
left: 0px;
height:100%;
width:100%;
background: #000;
display: none;
}

#test {
width: 600px;
display:none;
background: #FFF;   
}

HTML:

<a class="request-consultation" rel="leanModal" name="test" href="#test">
    Request Complimentary Consultation
</a>                 

<div id="test">
    <p>Lorem ipsum dolor sit amet.</p>
</div>
like image 627
pianofighter Avatar asked Jan 31 '26 04:01

pianofighter


2 Answers

Your code is totally work, please check the your jquery.leanModal.min.js path is right or not. _/ or should be ./

Take a look at this jsFiddle.

like image 199
caoglish Avatar answered Feb 01 '26 17:02

caoglish


try adding the third parameter.

$('#foo').leanModal({top:100,overlay:0.5,closeButton:".modal_close"});
like image 23
Jane Avatar answered Feb 01 '26 17:02

Jane