I'm trying to navigate through each of the tr element and select the 5th td element then store the value in it. What am I doing wrong?
$("table tbody tr td tbody tr:nth-child(4)").each(function (i) {
alert(this.text);
});
<table>
<tbody>
<tr>
<td align="center"><table cellpadding="2" style="border: 2px solid rgb(208, 208, 208)...
I would like to select the p elements inside a particular div, #homepage. I know how to select all the #homepage, or all of the li's on the page, but how do I selected a nested group of li's?
Thank you!
...
I have added HTML to my page using the .after() method using HTML that is retrieved from a .GET() 'Ajax' call.
I have a button in my retrieved HTML and an event that is set to be triggered when this button is clicked. However the method that handles the .click event is never triggered. When I put the same button into my 'normal' html ho...
is it possible to add a new property to a previously declared object? Here is some code to clarify (with the uploadify jquery plugin):
$('#featuredimageupload').uploadify({
'uploader' : base_url + 'media/js/uploadify.swf',
'script': base_url + 'post/uploadflash',
'multi' : true,
'queueID' : 'queue',
...
Is anyone aware of any jQuery plugins that can work with a dynamic options object?
What I mean is, I need to be able to pass in:
$('div').somePlugin({title : 'title1', label : function(element){}, etc.});
and also
$('div').somePlugin({name : 'name1', url : function(element){},
event : 'event1', etc.});
So the ...
At the moment, I have a Javascript (JQuery) front-end which periodically makes requests to a seperate, PHP script which returns posts.
For the sake of efficiency, however, I'd like to simply add new results to the array, not even looking at existing posts.
As it stands, I've attempted to do so with times (i.e. "SELECT * FROM table WHER...
I am currently working on some prototypes for a web site I am wanting to create. Part of the web site is going to be pretty heavy with javascript. Right now I am learning the jquery and ASP.Net MVC framework combo.
The issue I am having is where I should be forming the html generated for ajax requests. For example on page load I want ...
Hi
Can some one help me in this
I had a variable
var myValue = "what is you name? what is your age?"
i want to find the '?' in the string and replace it with a html input text element
where the user can enter the answer in the text box and at last i need a string as out put like this
"what is your name my name is xyz what is your...
Hi there,
I have a couple divs like so:
<div>1</div>
<div>2</div
all the way through to
<div>11</div>
<div>12</div>
And so on.
What I'm wanting is a jquery select that picks one of these, like so:
$('.ticketNumber:contains("1")').addClass('something');
The problem with this of course, is its going to select any of the divs tha...
I currently do this to check if an elements exists:
if ($(".element1").length > 0 || $(".element2").length > 0 {
...stuff...
}
Is there a better way to rewrite the same? I mean, ".length" the same as ".length > 0" ?
Thanks
...
I've done my homework and scoured SO to no avail. I've even gone from $.post to $.ajax in an effort to clean out everything. There's no cacheing either.
$('#send').click(function() {
$.ajax({
url: "submit.php?ts="+new Date().getMilliseconds(),
cache: false,
type: 'POST',
dataType: 'text',
data: $("#myform")...
So I've got somewhat of a cool task and I'm just thinking it over. I'm more a designer so I thought I'd tap into the bright minds on here.
I am creating a basic page that displays the results from a twitter search results page. Put simply, I am displaying an atom feed with HTML. I'd like to do it with PHP, unless someone has something b...
I'm not getting how to do this, or if I can do this. I have an accordion, multiple sections with each section containing multiple anchor tags each with a unique string id. I'd like to be able to have the accordion open to where a particular element with a given id is. Like say id "item117". Can I use something like
$('#accordion').acti...
Seems pretty simple but I cant get it to work.
If I have two divs with the class of 'user'
I want to output 'you have 2 divs'
<script type="text/javascript">
$(document).ready(function() {
function divcount() {
var mycount = $('.user').length();
document.write(mycount)
}
});
</script>
I'm sure im mi...
I used the jQuery datatable plugin in sort the table data. The sorting works fine if a column contains simple text. If I put any anchor tag condition on a text then the column sorting does not sort properly.
I displayed the values in following manner:
<td><?php if ($allAptArr[$d][27]['staffinactive'] == 1) { ?>
<?=ucwords(str...
I have a form on my website (http://www.jakelazaroff.com/#contact) that I submit with jQuery. The callback function for when the form is successfully submitted is supposed to make the form fade away; however, for some reason this only works on certain browser/OS combinations. Right now, the compatibility list is as follows:
WORKS
o f...
is there a way to do this? I'm not looking for an alternative plugin (like FancyUpload or Uploadify), I just want to know how I can ajaxify the submission of an upload form.
...
I have a function that looks like this:
jQuery.fn.menuFunc = function( settings ) {
settings = jQuery.extend({
actionAddURL:"",
actionModifyURL:"",
........
},settings);};
where all the parameters i initialize (actionAddURL, actionModifyURL, etc..) are strings (ids of different elements...
Hi Guys,
I am about to begin a project that requires an amount of JS. I was having trouble deciding what JS library / framework would fit best. So I thought I would float the question here.
Specifically, which of your favorite features does one framework implement which the other one loses out on? Are there any conceptual reasons why y...
Hi there
I am trying to append my JSON data to a div. For some reason I am not seeing, it does not append. The data is collected correctly from Django view, I can see this is the FireBug console.
Here is my JS
$.getJSON('/chat/xhr_test/', function(response_array) {
var arr = response_array;
$.each(arr, function(count, item) {...