Ask questions and get good answers on mb.jQuery.components

Hi, Excellent Work, thanks :) I trinying to do my extruder (menu) to load at the same page via ajax but i dont' cant do it, can you give a example, please?

asked Sep 20 '10 at 20:46

Mario's gravatar image

Mario
362


Hi I were working at my question, and i did it:

I write code (ajax) for my second file (parts) :

<script type="text/javascript">    
function UpdateDiv(Url, Capa){
        Capa = Capa||"data";
        $.ajax({
            type: 'get',
            url: Url,
            dataType: 'html',
            success: function(data){
                $("#"+Capa).html(data)
            }
        });
    }
$(function() {
$("#cargaAjax a").click(function(){         
            UpdateDiv(this.href, this.rel); 
            return false;
        });
});
</script>
<div class="cargaAjax" id="cargaAjax">
...Contents second file by i.e.
<div><a href="pres.html" rel="WindowContent" name="presentacion" >Pres</a></div>
</div>

And then at the main page I add a div called like the a attribute REL, this is "WindowContent"

Finally I'am mix the extruder for menu and aerowindow for contents

answered Sep 21 '10 at 13:34

Mario's gravatar image

Mario
362

Your answer
toggle preview

jQuery main site - Matteo Bicocchi