Passing a varible from jQuery to PHP

First, don’t use query_posts.

Second…

I think this can be done with AJAX but is there a more simple method
and give me a clean URL?

PHP runs on the server. Items are “clicked” on the client machine. The only way to pass that “clicked” value back to PHP is via AJAX. Within a WordPress framework that mostly means using the WordPress AJAX API.

So, there is no more simple method than AJAX to get a “clicked” value back to PHP.

However, if your original PHP Loop prints the post body to the page and you hide it by default via CSS– ie. display:none— then your jQuery/Javascript can then selectively show/hide content and you don’t need another request to the server at all. That may count as “more simple”, if that is an option.

I don’t know what “give me a clean URL” means in this context.