How can I load a Featherlight modal with ajax content by sending POST data in the featherlight request instead of GET?
$.featherlight({
ajax: 'some.php'
});
The above code will load the content from 'some.php'. What if I want to send along a POST value?
For example with jQuery I would use:
$.ajax({
method: "POST",
url: "some.php",
data: { name: "John", location: "Boston" }
})
That would pass along some POST data. This is what I'm trying to accomplish with featherlight.js. Is this possible?
If you look in the
featherlight.js
file, the method called for the ajax call isload
which is like$.get
,load
can take data, but it was not added in featherlight code as you can see below.So, to answer your question, you cannot send post data.