Ajax loader ssue

i have a button(click here), while clicking on it fancybox modal window is opening in that modal window there is a searchbox, to get the search results making an ajax call(request()), before send the ajax call kept a loader. Issue is while ajax loading(loader) itself close the fancybox again clicked on button the same window with loader is showing how can i refresh that.

<div id="btn">Click here</btn>
<dov class="loader" style="display:none"><img src="path"/></div>

$('#btn').click(function() {
        type: 'inline',
        content: '#content'

function results(){


	type: 'POST',
   	 url: url,
   	 data: data,	

	//for loog to get json data
	complete: function(){ $('.loader').css('display','none');}

Are these copy/pasted, or did you type them here? If it’s copy/pasted, look at the close to the btn div, and the element with class loader…

@DaveMaxwell: On the fly just for example I have typed the code, anyways thanks for highlighting. Please ignore the typos.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.