- Screen name: fahad.direct
fahad.direct's Profile
14 Posts
14 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 12-Sep-2017 07:23 AM
- Forum: Using jQuery Plugins
Form is submitted through jquery code $("#myform").ajaxForm().submit();
On the other hand I have another submit button on the same form which triggers fine but it triggers through jquery without refreshing the page and i want it to refresh the page without jquery as a default behavior. How can i do so?
I tried something like below but it still submits using jquery. Any help would be highly appreciated in this regard.
$("#Save").click(function(e){
e.preventDefault();
$('#myform').submit();
})- I am unable to get the form element due to some reason. Infact these elements are on bootstrap modal called by ajax.
Below is my code
<form action="#" method="post" id="myform">
<input type="text" class="name" placeholder="Your Name" id="name">
</form>
Below doesn't work:
name=$("input#name").val();
name=$("#name").val();
name=$("form#name").val();
name=$("#myform #name").val();
name=$("#myform input#name").val();- I am having a x-editable jquery for my table to edit its cell value at run time. It requires pk for primary key and i want to get value of first <td> and assign to pk to be sent through ajax, Can i have help on it please how can i do so?
<tr><td>5</td>
<td><span class= "xedit" id="5"><a href="javascript:void(0);">Yes</a></td>
</tr>
t.$('td a').editable({
url: 'update_inline.php',
type: 'select', source: function() {return source;},
pk: how to assign it?
});
- I want to select cell value of first td on row on which click event is performed. My table structure is below:
<table id="commission_view">
<tr class="comm_row">
<td><span class="hidemyrow">my value1</span></td>
<td>my value2</td>
<td>my value3</td>
<td>my value4</td>
<td>my value5</td>
</tr>
$('.comm_row').on('click', function() {
var hideme=$(this).next('.hidemyrow').text();
alert('text='+hideme);
});
});
It shows empty, i also tried with .html() but it still shows null. How can i get the value of first td which is "my value1"
- 10-May-2015 04:51 PM
- Forum: Using jQuery
I have multiple elements having same class names as below:
<div class="call-now">First</div> <div class="hideme">1234</div> <div class="call-now">Second</div> <div class="hideme">8855</div> <div class="call-now">Third</div> <div class="hideme">7411</div>
Whenever call-now is clicked it should show the value from its hideme div on its click. Currently by below code it alerts all possible values from all hideme elements:
$('.call-now').on('click', function() {
alert($('.hideme').text());
});
I want to alert the value 1234 when first call-now is clicked, 8855 when second call-now is clicked and 7411 when 3rd call-now is clicked. I also tried below with each but no luck:
$('.call-now').on('click', function() {
$('.hideme').each(function(){ alert($("this").text()); })
});
- I am having an array of checkboxes like:
<input type="checkbox" value="8029" id="chk_status110" name="chk_status[]"> where each having its own unique id and value. How can i check / uncheck specific so that it should automatically get its id and check it if it is unchecked or uncheck it if it is checked.
When i try $(':checkbox').prop('checked', true); it selects all and not a specific one when i click on its label.- .one() stops multiple clicks which is fine, how can i add an alert when one hits it next time?
$( "#save_btn" ).one( "click", function() { })- I have tried by different ways to submit #myform from with in $.get but it doesn't work. I need help please. My code is below:
$('#myform').submit(function(e) {
ow_contact=$("#owner_contact").val();
mobcontact=$("#owner_mobile").val();
ow_lastname=$("#owner_last_name").val();
if(ow_contact!=ow_lastname+' - '+mobcontact){
$.get("mob_check.php", { mob_ct: mobcontact}, function(data){
if(data=='NGot'){// #myform i want to submit here which doesn't work}
else{// do something else}
});
return false;
}
})In my grid, 4 div based cells collectively make a row. If i rollover any cell it should highlight all other cells of the row. My code is as under:
<div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-1-0">First Column</div>
<div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-2-0">Second Column</div>
<div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-3-0">Third Column</div>
<div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-4-0">Fourth Column</div>
There is a unique id of each div and all in sequence as: id="cell-1-0" for first cell, id="cell-2-0" for second cell, id="cell-3-0" for third cell and id="cell-4-0" for fourth cell.
If i rollover any of the cell i want to change the color of all the cells collectively from id="cell-1-0" to id="cell-4-0" so that my entire row colour should be changed.
- A form in popup to be filled which opens on hyperlink click from a parent window, i want to refresh the only section of parent window to update parent window when popup is filled and submit button is pressed.
- Once opacity changes by fadeTo how does it come back to the normal state of opacity?
- How can i use spinning icon while it is fading In:$("#click_div").click(function(){
$("#loading_div").load("page.php").hide().fadeIn(2000)});- I am using HTML in JQuery cycle plugin where there is a banner image in background and the text on it. When page loads text comes very earlier and background takes to long to be loaded. Can i have any solution to load both together?
- I am using $('.CycleContents').cycle which works quite fine in all browsers but if i load the contents before cycle by using load function it works in firefox but in IE i need to refresh and then it works and doesn't work very first time.$(document).ready(function() {
$(".slideshow").load('_inc/slides.php');
});
$(window).load(function () {
$('.CycleContents').cycle({
fx: 'fade,wipe,fadeZoom',
speed: 4000
});
});Any help please.- «Prev
- Next »
Moderate user : fahad.direct
© 2013 jQuery Foundation
Sponsored by
and others.