nnmware / devoops

DevOOPS Bootstrap 3 Admin theme
GNU General Public License v3.0
852 stars 416 forks source link

load ajax url in loaded page #14

Closed botanicvelious closed 10 years ago

botanicvelious commented 10 years ago

would be really nice if you could put #ajax links into the ajax loaded page content and have it reload the content.

devoopsme commented 10 years ago

Not fully understand what you want. Please write details.

botanicvelious commented 10 years ago

Using the theme I created the page, http://tempestintheaether.org/damn/html/#ajax/loader.php?page=projects

as you can see the "projects" page loads just fine, however when i click on a link that was ajax loaded such as Peragro Tempus the ajax loading javascript doesn't get called to bring me to the next page.

I can goto http://tempestintheaether.org/damn/html/#ajax/loader.php?page=projects_id/1 manually and it loads fine, its only when its being loaded from inside the ajax-content class that it doesnt work and im using the url #ajax string.

devoopsme commented 10 years ago

Why it's need loaded? In devoops.js handler set only for elements in main-menu (see line 2244), with class ajax-link (line 2272, 2280). First you need add class to required link. for example: <a class='my-example-load'> You link </a> And add script at page $('body').on('click', '.my-example-load', function(e){ e. preventDefault(); var url = $(this).attr('href'); window.location.hash = url; LoadAjaxContent(url); });

Please read documentation about jQuery for understanding how it work.

simonckenyon commented 10 years ago

i also have code to handle forms and multipart forms, if anyone is interested

botanicvelious commented 10 years ago

that would be amazing

simonckenyon commented 10 years ago

will make a diff and post it

RaquelOhashi commented 9 years ago

hey, @simonckenyon can you send me the code to handle forms? i really need it! :+1: