Skill Tag: jQuery
Wed 30th Nov
PHP Check for an AJAX call
I just learned that it’s possible to check in php if a request has been made through an ajax call which is handy when you want to return a different template depending on if it’s ajax or not. To do it you just add this snippet:
function is_ajax(){
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'));
}
Fri 17th Jun
jQuery Mobile
Check out jQuery Mobile. I think I’m gonna see if I can add this to my next WordPress theme.
Thu 16th Jun