hey guys could anyone quickly show me how I'd go about combining these:
$(document).ready(function(){
$("#generate-quote").click(function(e){
e.preventDefault();
$.getJSON("generator.php?", {act: 'char_con', bc: '1'}, function(data){
$(".quote").html(data);
});
});
});
$(document).ready(function(){
$("#env").click(function(e) {
e.preventDefault();
$.get("char_con.php?", {act: 'char_con'}, function(data{
$(".q").html(data);
});
});
});
Right now they obviously do different things, but what I'm after is:
$(document).ready(function(){
$("#env").click(function(e) {
e.preventDefault();
// do both
$(".q").html(data);
});
});
});
I know how to make it call multiple functions, but I'm just a bit confused as ones using .getJSON so nothing I've tried has worked as of yet,
anyone know how this would be done?
Thanks for any help.