how to slider bar open using jquery
-----------------------------------------------------------------------------------------------
<script type="text/javascript" src="<?php bloginfo( 'template_url' ); ?>/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
jQuery(".pull_feedback").toggle(function(){
jQuery("#feedback").animate({left:"0px"});
return false;
},
function(){
jQuery("#feedback").animate({left:"-527px"});
return false;
}
); //toggle
}); //document.ready
</script>
-------------------------------------------------------------------------------------------------
<script language="javascript">
function processForm(formId) {
document.getElementById('process').style.display='block';
$.ajax({
type: "GET",
url: "form_ask.php",
data: "sendmsg="+document.getElementById('user_question').value,
success: function(msg)
{
//alert(msg);
document.getElementById('process').style.display='none';
$('#message').html(msg);
$('#user_question').val('');
return true;
},
error: function(){
return false;
//alert('some error has occured...');
},
start: function(){
alert('ajax has been started...');
}
});
}
</script>
--------------------------------------------------------------------------------------------------
<div id="feedback">
<h2>Sikh Counseling</h2>
<form action="" id="form1" method="post" onsubmit="processForm('form1');return false;">
<div style="clear:both; padding-bottom: 8px;"></div>
<div id="message"></div>
<div id='process' style="display:none"><img src="loading.gif" ></div>
<p>
<textarea id='user_question' onfocus="if(this.value=='Type Your Sikh Counseling Question Here...') this.value='';" onblur="if(this.value=='') this.value='Type Your Sikh Counseling Question Here...';">Type Your Sikh Counseling Question Here...</textarea>
</p>
<p class="txt">Sikh Counselors are Online Now</p>
<p>
<input type='submit' name='submit' value='submit' class="btn"/>
</p>
</form>
<a href="#" class="pull_feedback" title="Click to leave Question">Question</a>
</div>
------------------------------------------------------------------------------------------
<script type="text/javascript" src="<?php bloginfo( 'template_url' ); ?>/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
jQuery(".pull_feedback").toggle(function(){
jQuery("#feedback").animate({left:"0px"});
return false;
},
function(){
jQuery("#feedback").animate({left:"-527px"});
return false;
}
); //toggle
}); //document.ready
</script>
-------------------------------------------------------------------------------------------------
<script language="javascript">
function processForm(formId) {
document.getElementById('process').style.display='block';
$.ajax({
type: "GET",
url: "form_ask.php",
data: "sendmsg="+document.getElementById('user_question').value,
success: function(msg)
{
//alert(msg);
document.getElementById('process').style.display='none';
$('#message').html(msg);
$('#user_question').val('');
return true;
},
error: function(){
return false;
//alert('some error has occured...');
},
start: function(){
alert('ajax has been started...');
}
});
}
</script>
--------------------------------------------------------------------------------------------------
<div id="feedback">
<h2>Sikh Counseling</h2>
<form action="" id="form1" method="post" onsubmit="processForm('form1');return false;">
<div style="clear:both; padding-bottom: 8px;"></div>
<div id="message"></div>
<div id='process' style="display:none"><img src="loading.gif" ></div>
<p>
<textarea id='user_question' onfocus="if(this.value=='Type Your Sikh Counseling Question Here...') this.value='';" onblur="if(this.value=='') this.value='Type Your Sikh Counseling Question Here...';">Type Your Sikh Counseling Question Here...</textarea>
</p>
<p class="txt">Sikh Counselors are Online Now</p>
<p>
<input type='submit' name='submit' value='submit' class="btn"/>
</p>
</form>
<a href="#" class="pull_feedback" title="Click to leave Question">Question</a>
</div>
------------------------------------------------------------------------------------------
Comments
Post a Comment