another issue now
Not really related, but didnt think it warranted making a new topic since its probably a stupid mistake again
$('#submit').submit(function(){
var $inputs = $('#filtering :input');
var filterData = {};
$inputs.each(function() {
filterData[this.name] = $(this).val();
});
var request = $.ajax({
type: "POST",
url: "filters.php",
data: filterData,
dataType: 'text',
success: function(){
$('#filters').fadeOut(250);
$('#results').fadeIn(250);
}
});
request.done(function(msg){
alert(msg);
});
request.fail(function(){
alert('fail');
});
});
<section id="right">
<div id="filters" class="scrollable">
<h2>Filters</h2>
<form method="post" id="filtering">
<input name="search" id="search" type="text" placeholder="Search Query..."/>
<div class="group">
<!-- uses sprites for efficiency, but *could* use individual <img>'s iff absolutely necessary -->
<div class="filter" name="Gender">
<div class="image" name="Either" style="background-position: 0px 0px"></div>
<div class="image" name="Male" style="background-position: 0px -70px"></div>
<div class="image" name="Female" style="background-position: 0px -140px"></div>
<div class="image" name="Neither" style="background-position: -70px 0px"></div>
<input type="text" class="input" id="gender_val" name="gender" value="" disabled="true" />
</div>
<div class="filter" name="Location">
<div class="image" name="Huh?" style="background-position: -70px -70px"></div>
<div class="image" name="Happy" style="background-position: -70px -140px"></div>
<div class="image" name="What!?" style="background-position: -140px 0px"></div>
<input type="text" class="input" id="location_val" name="location" value="" disabled="true" />
</div>
</div>
<input id="submit" type="button" value="Go →" />
</form>
</div>
<div id="results">
<div class="scrollable group">
<a href="play_video.html" title="Result 1" style="background: url('data/grass.jpg')"></a>
<a href="play_video.html" title="Result 2 which is a really cool result></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
<a href="play_video.html" title="Result 1"></a>
<a href="play_video.html" title="Result 2 which is a really cool result"></a>
<a href="play_video.html" title="Result 3"></a>
<a href="play_video.html" title="Result 4"></a>
<a href="play_video.html" title="Result 5"></a>
</div>
<input id="back" class="fl-left" type="button" value="←" />
<div class="pagination fl-right">
<a href="#" class="disabled">« previous</a>
<a href="#" class="current">1</a>
<a href="#">2</a>
<a href="#">3</a>
<span class="ellip">…</span>
<a href="#">17</a>
<a href="#" >next »</a>
</div>
</div>
</section>
When i press the go button, nothing happens. Any ideas why? :/
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos:
http://goo.gl/58pN9