views:

135

answers:

1

Hello,

I'm using a JQUERY Plugin for mdoals called Facebox. The issue I'm having is for some reason, the JQUERY I'm writing isn't able to modify the Facebox Modal once it's open.

Here is the code snippet:

<script type="text/javascript">         
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
});

function sendviewemail (action) {
$("#shareboxcontent").toggle();

$("#shareboxcontent").load("/notes/?blah", function(){
$("#shareboxcontent").slideDown();
});
}
</script>

<div id="sharebox" style="display:none;">
<h1>Send to your team</h1>
<h2><span id="" onclick="sendviewemail(); return false;">Or, send via email</span></h2>
<div id="shareboxcontent" style="display:none;">boooo</div>
</div>

To be specific, the issue is with "$("#shareboxcontent").slideDown();" and with the .load. The JQUERY is running without errors, but not inserting the HTML from the JQUERY.LOAD, or sliding down the div.

Any ideas?

A: 

First things first, I don't see any anchors (<a> tags) with rel="facebox". That's required to create at least the very first instance of the facebox. Try this:

<h2><a href="#shareboxcontent" rel="facebox">Or, send via email</a></h2>

Hope that helps.

seangates
The above is if you want "boo" to be displayed. If you would like the external file "/notes/?blah" to be called, use <h2><a href="/notes/?blah" rel="facebox">Or, send via email</a></h2>
seangates