browserstate / ajaxify Goto Github PK
View Code? Open in Web Editor NEWAjaxify your entire website instantly with this simple drop-in script using the HTML5 History API with History.js and jQuery ScrollTo.
Ajaxify your entire website instantly with this simple drop-in script using the HTML5 History API with History.js and jQuery ScrollTo.
I was using https://github.com/dcooney/wordpress-ajax-load-more in my theme, and it was working great.
But as soon as I added https://github.com/browserstate/ajaxify the load more functionality stopped working.
How can I fix this ?
I'm having a little trouble getting ajaxify to load the content correctly. I have the content selector set as #content, which just contains the page content, not the header/footer or anything, but whenever I click an "ajaxified" link, it loads the whole page into the #content div. Is there anyway I can just load the #content div on pages instead of the whole page?
Also when the load is complete, the page title is display above the header as well.. any idea why?
I didn't understand... where i put this line?
javascript:var%20e=document.createElement('script');e.setAttribute('src','//rawgithub.com/browserstate/ajaxify/master/ajaxify-bookmarklet-helper.js');document.body.appendChild(e);void(0);
Thank you :)
Hi, I have a select menu with multiple options which link through to HTML pages (using value="link.html"). How difficult would it be to modify the current script so that this also works via the plugin?
Thanks in advance.
Currently this plugin only updates a change to the document title, yet how do we update the page body class with the new page name.
both elements should update after new page has loaded.
Any suggestions
Hello,
I am trying to use Ajaxify in a Mkdocs project. So far so good, however, it seems part of the markup, the Navigation in this case, does not refresh on link click and I have no idea why. There is no JS involved, just plain HTML in this case.
I am encountering this issue on Chrome.
I'm updating my main content (div#container) with ajaxify. This div may contain some script tag dynamically generated from CMS. But ajaxify is removing all scripts tags within the content by "$scripts.detach();". How about options to overcome it.
EDITED:
I was wrong, ajaxify reinsert the script back. was console.loggin at wrong place.
Anyone knows how to initiate an Angular controller on 'statechangecomplete'?
tweetsApp.controller('tweetsCtrl', ['$scope', '$attrs', '$http',
function($scope, $attrs, $http, djangoUrl, linkify, $sce) {
$scope.initTweets = function() {
$http.get('/some/url/').
success(function(data, status, headers, config) {
$scope.tweets = data;
});
}
}
]);
When a page is loaded, but has <script>$(document).ready(function(){})</script> inside itself, the script is not fired, because .ready is never triggered if the page is not reloaded. is there an easy way to do that?
Are there any known issues with Doubleclick for Publishers? I'm using Wordpress and DFP. The ads being served are part of the content that reloads each time. After clicking through to a new page, the ads are served but then disappear in a fraction of a second.
All of the scripts are properly enqueued in the WP functions file, and I haven't changed anything except the target div id to load new content into. Everything works perfectly except for this issue.
The furthest I can get in terms of diagnosing a problem is that the stock DFP script is being interfered with by "jquery.history.js" and/or "ajaxify-html5.js" (which isn't very far, I know).
I'm a bit of a jQuery/javascript neophyte, so this could be something I'm doing wrong or something easy to fix. Would anyone have an idea of what the problem might be initially?
I have a ".no-ajaxy" on dynamically created content but ajaxify-html5 does not seem to respect that.
Is there any workaround?
function do_something(){ $('.gallery-icon a').addClass('fancybox no-ajaxy').attr('rel', 'gallery'); }
above function is executed after every ajax requests.
I can verify that above class has been added into the element by looking in firebug.
But ajaxify-html5 seems to load that content with ajax too. How can i make sure '.no-ajaxy' class does work like expected.
Hello,
I implemented Ajaxify into a Wordpress theme and everything is working fine. But external plugins don't reload after changing pages. Their JS isn't loading again. They work only on first page load/refresh of the page.
How can I reload these plugins?
Regards
Whith jquery.min ver 181 no issue.
This message is of console firefox whith jquery.min ver 191:
[10:33:53.515] Error: Syntax error, unrecognized expression: [div class="document-html"]
I tried few combination, but not working.
< li class="current">About
It did remove the .current class above, but did not highlight the .current class on the clicked button.
Download sample > http://www.sendspace.com/file/0lmhlz
I have some pages. They generated inline javascript code from php. For example:
<script>
var someArray = Array();
<?foreach($videos as $num=>$code):?>
someArray['<?=$num?>'] = '<?=$code?>';
<?endforeach;?>
</script>
$code
= iframe html's from youtube (as example).
Actualy they may contain anything as <div><span>text</span></div>
So when page load directly - all work as well.
But when this page load from ajaxify inline script cut all tags in inline javascript.
What i can do for fix them? I see in ajaxify code watch for all open and closed tags, which cut and paste in document-html element and paste to result page. I want to cut inline js first and before that parse html tags. So, i think first stage is cut all around .content element, them parse inline js and after that work with other tags.
Any idea? (sry for bad english). Thanks
I get endless console.log "Loading jQuery" messages.
The script element for //raw.github.com/browserstate/ajaxify/master/ajaxify-bookmarklet-helper.js gets successfully added to the end of my
But the line in that file:
window.jQuery || document.write('<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>');
doesn't seem to actually work.
I'm using firefox 20. That document.write line doesn't seem to work when run by itself via the console. But document.write('foo'); does work.
page ajazification works great but after ajaxification all the scripts stop working.
here is a sample code of mine
$('.browse-all-btn').on('click', function(){
$browse.stop().slideDown();
$(this).addClass('selected');
});
$browse.on('mouseleave', function(){
$(this).stop().slideUp();
$('.browse-all-btn').removeClass('selected');
});
any help to make these script work again after ajaxification will be appreciated.
thank you
Hi guys,
Great plugin.
I would like to use it on my project, where I just Handlebars.JS to render dynamic content.
However, when I just Ajaxify then the Script-tags (that Handlebars use for templating), gets converted to DIV-tags and are rendered in the DOM.
Is it possible to remain the script-tags as script-tags, so Handlebars understands them again?
Hi,
I am using this plugin for one my client's site at http://test.kittysu.com
Things work as intended on major browsers.
But on window's IE9 browser, I get the following issues
Can you please guide me how to sort the above mentioned issues.
Thanks
This plugin works very well (in Chrome) on a site I'm developing. In Firefox, however, ajax isn't firing at all. Is this a known issue with the plugin or could there be something else interfering with it?
Edit: I realize this is a vague question. Here's the error message I'm getting in Firebug.
-- Start Error --
ReferenceError: event is not defined
if ( event.which == 2 || event.metaKey ) { return true; }
-- End Error --
I hope this is the right place to ask these questions.
I'm curious... is there a callback we can use without having to input specific needs into the script?
I've tried hunting around, but I'm keen to add a few callbacks once the ajax method has completed; or better yet, an option beforeAjax and afterAjax.
Thanks,
R
Although it might work css('opacity',100) should be correct wise css('opacity',1). When you look into style attribute of element, style="opacity:100" is wrong CSS
When serving a javascript file from the github.com raw url such as http://raw.github.com/browserstate/ajaxify/master/ajaxify-html5.js, it gets sent as a plain text mime-type, which cannot be used as a script in internet explorer (or at least causes issues), so it may be beneficial to some users to keep a mirror of this project on both the master branch, and gh-pages branch, and then the script could be loaded from here http://browserstate.github.com/ajaxify/ajaxify-html5.js with the correct mime-type.
Love Ajaxify, fits exactly to my needs. One problem though:
I use it on a WP install. It works like a charm, but it does not assign a 'current' class to the link that points to the homepage. The home-link is also the first link in the navigation, but I changed the order and the problem was not solved. It somehow forgets to mark the homepage as active. Does not matter which page you start from, all the links work, the home-link works as well but just does not recieve a current class. Does anybody know why this is?
Keep it up, awesome work! :)
the link for Andrew Rubanov's site ( http://andreyrubanov.ru/ ) in showcase is a pornsite. Please remove the url or perform the action required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.