Hey all
I have some jQuery ajax where it appends a new row to a table from adding some form data. I like to add a function where after the row has been appended it sorts by a field value within the tables. So here is a table with some dummy data.
<table>
<tr><td><input type="text" name="hour[from]" value="1"> Hour From</td><td><inp...
Hey everyone,
I was hoping someone could nudge me in the right direction. I'm using the jQuery plugin simpleAutoComplete to enhance my search form with an autocomplete functionality. Basically the search functionality allows users to search for capital cities in the world. I have it designed so that my handler file returns the City N...
Is there a version of a Mootools Auto-collapsing breadcrumb like the jBreadCrumb plugin for jQuery?
http://www.comparenetworks.com/developers/jqueryplugins/jbreadcrumb.html
...
Prototype's activate function
Gives focus to a form control and selects its contents if it is a text input
according to the Prototype website. i.e.
$('my_element_id').activate();
What is the equivalent function in jQuery?
...
I have this simplified version of my webpage (its a mess IRL):
<li id=section1 class=sortable_section>
<header>
<ul id=container1>
<li id=item1 class=sortable_item>
<li id=item2 class=sortable_item>
</container
</section
<li id=section2 class=sortable_section>
<header>
<ul id=container2>
<li ...
i am posting to a mailer.php file.
mailer.php
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "Contact via website";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
echo "Data has been submit...
Hi,
How to get the index of selected Asp.net checkBoxList items and the text value of it using jquery
I used the code listed but it did not work with me.
First two lines will return message with "undefined" string
var index = $('#<%=chkListGroups.ClientID %>').attr("selectedIndex");
alert(index);
second two lines will re...
I'd like to have a custom function repeatedly called as long as a custom filter function matches.
use case:
// filter
function overflow() {
return this.clientHeight < this.scrollHeight;
}
// apply
$("article").filter(overflow).css_calc({fontSize: -1});
Is there a generic way in jQuery to call the subsequent function as long as ...
Hi
I have this HTML which looks like this:
<input type="submit" name="savebutton" class="first button" />
<input type="submit" name="savebutton" class="second button" />
and JS:
jQuery("input.second").click(function(){
// trigger second button ?
return false;
});
So how can I trigger the click event from the 2nd button by cl...
I'd like to be grab the next to last TR in a table.
$("#TableID tr:last")
gets the very last one, is there some way I can get the TR prior to that one?
...
I have a webpage with a tiled background body image. It needs to be tiled because the designer wants it scalable with the browser window. It creates a very specific grid over which the rest of the site is designed.
There is also a white page border around it (created via a separate div with a higher z-index) because the designer wants t...
How do I rewrite this code to change a class name with jQuery more efficiently?
$(function() {
$('#container').click(function(event) {
var element = event.currentTarget;
/* Toggle the setting of the classname attribute */
element.className = (element.className == 'card') ? 'card flipped' : 'card';
});
});
...
Hi Everyone.
I am trying to read blog entries feed by using Google-Ajax-Feed-API and JQuery. I have achieved most of the stuff, but in refreshing the DIV tag after every 10sec, I am having some problem.
The code does not refresh DIV tag in IE or Chrome.(however refreshes well in Mozilla).
Any help? Thanks.
<script type="text/...
I want to set both #map_canvas and #content's height, but this doesn't seem to work:
$(['#map_canvas','#content']).css("height", ($(window).height()-270 + "px"));
Does anybody know how to do this?
...
Hi All,
I have a table structure:
<tr>
<td>
<a href="#" class="xx"></a>
</td>
<td>
data
</td>
</tr>
<tr>
<td>
<img src="#" class="cc" />
</td>
</tr>
<tr>
<td>
<a href="#" class="xx"></a>
</td>
<td>
data2
</td>
</tr>
<tr>
<td>
<img src="#" class="cc" />
</td>
</tr>
Now, on load, 2nd an...
Hi all,
I am using jQuery's $.get() to load some content to a div whose id=results :
$.get('dynamicpage.php',
function(data) {
$('#results').html(data);
});
The returned content has got a select in it :
<select id="myselect"><option value="10">10</option></select>
I have already put a listener for the change on this select :
$('...
$j("<%= @sortable_contents %>").sortable({
connectWith: '.section-content',
axis: 'y',
zIndex: 1003,
cursor: 'crosshair',
update: function(){
d = $j(".sections > li").map(function(index, element){
return [$j(element).attr('id'),
$j("#"+$j(element).attr('id') + " .content").map(funct...
My view model has the property:
public IEnumerable<string> Names { get; set; }
My view displays that information using a simple markup that renders to:
<div id="names">
<ul>
<li>Name1<img src="/delete.png"/></li>
<li>Name2<img src="/delete.png"/></li>
<li>Name3<img src="/delete.png"/></li>
</ul>
</div>...
I have an Ajax request:
$.ajax({ url: "MyPage.aspx",
data: params,
success: function(data) {
// Check results
$('#testp').append(data.message);
enableForm();
},
error: function() {
alert('Unable to load the permissions for this user level.\n\nYour login may have expired.')...
I have an event attached to a div element that will remove the element onclick. I also have a jQuery live event that I am attaching to the same element like so,
$("#divEle").live('click', function() {
alert($(this).html());
});
In FF, this event executes. But in IE8 the first event removes the element and the live event never take...