I am trying to make an ajax call using $.get() where I want to pass in a specific element selector (#id) into the data:
$.get('http://www.url.com',
{
param1: 'param1Val',
param2: 'param2Val',
#id: 'selector'
}
function(data) {
...
});
I could try passing it in as
$.get('http://www.url.com#id', ... );
EDIT
The purpose of attempting to use a #selector within the request URL is to grab only a specific “chunk” of HTML from within a specified element — hence, I use remote_URL#element_id in the address. This works the same as any <a href="#go_to_element">Go to element with id="go_to_element"</a> link which will send you to a specific part of the page.
See the answer below.
jQuery’s $.load() method allows you to send an AJAX request to a specific section of another page, returning the HTML contents of that section in the data parameter in the $.load method’s callback function.
http://api.jquery.com/load/ (Re: Load Page Fragments)
Thanks to those who attempted to help on this! Sorry the question was poorly phrased.
Cheers