Problem to insert a load() function to my code
Hi everibody !!
I am using this code :
- $(function(){$('#content').find('article').hide().css({width:'0',marginLeft:'0%',left:'50%'});
- var act='#page_1';$('#page_1').show();$('a').click(function(){page=$(this).attr('href');
- if(page.substr(page.indexOf('#'),6)=='#page_'){
- $('#menu a, footer a').parent().removeClass('active');
- $(this).parent().addClass('active');
- $(act).animate({width:'0',marginLeft:'0%',left:'50%'},600,'easeInCirc',function(){
- $('#content').find('article').css({display:'none'})
- $(page).css({display:'block'}).animate({width:'100%',marginLeft:'0%',left:'0%'},600,'easeOutCirc',function(){act=page;});});return false; }})})
to show an animate content when i click on one of these anchors :
<ul id="menu">
<li><a href="#page_2"><strong>about us</strong><span></span></a></li>
<li><a href="#page_3" ><strong>Products</strong><span></span></a></li>
</ul>
My jquery code with css show and hide this element <article> :
- </article>
- <article id="page_2">
- i need to show my page.php here
- </article>
My problem is how i can add a
load() function to my jquery code to insert an external page inside my <article> element, for exemple in bootstrap we can use
data-target to show an external page inside a modal popup.
Thank you very much !!