Include PHP file with jQuery -


is possible include files jquery?

eg.

if browser width > 999     include(objects_path."_ids/catalogue_slideshow_popup.id.php");  else    include(objects_path."_ids/art_catalogue_popup.id.php"); 

thanks!

no, not in regular sense. php interpreters run on server while jquery runs on client (browser) , has no knowledge of server. jquery technically fetch code, wouldn't understand it.

what make php server output client can understand, html code (with or without javascript) or json object can used jquery.

(php language theoretically write client-side interpreter, there better options trying do.)


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -