Hi there,
You could the following a try:
$(document).ready(function() {
var index = $(#mymenu ul li).index( $(li:has(#link_y)) );
// index will store the 'index' of li tag that has id=link_y
});
Hope this helps,
Thanks,
Abdullah.
On May 14, 8:31 am, Jo jo.arg...@gmail.com wrote:
My
Hey there,
You could try the following:
$(document).ready(function() {
$(ul li).each(function() {
var thisName = $('.name', this).text(); // get the content inside
'.name' class of this element
$(this).append('span class=additionala href=addinfo.php'+
thisName +'s additional Info/a/span
Hi There,
If I am not mistaken, 'contains' is a selector not a method.
http://docs.jquery.com/Selectors/contains
You could try with the following:
$(span.total:contains('1)).parent().hide();
OR, if you decide to place it in If-else block, then do the following:
if
Hi there,
A few things to consider..
From your HTML form code:
change this:
input type=checkbox name=attributes[accept-t-and-c] id=accept-t-
and-c value=yes CHECKED /
to:
input type=checkbox name=attributes[accept-t-and-c] id=accept-t-
and-c value=yes checked=checked /
From you JS Code:
Hi There,
If I am getting this right.. you are trying to get the contents of
another file and inject it into an element, but ensuring it shows as
plain text and javascripts are not executed.
Can you try replacing $('#thisDiv').load with a $.get request and do
the following:
Hi,
I believe you can use the following approach:
Since you are requesting to another page, you can use the server-side
script (PHP) to return the id, type, and success message in JSON
format and then use them from jQuery, and instead of $.get, you can
use $.getJSON or $.ajax, Using this
Hi,
I believe you can post form either using $.post or $.ajax method and
there's a function called serialize( ), which serializes form data,
instead of typing it's data in key value pairs manually.
Serialize:
http://docs.jquery.com/Ajax/serialize
$.post and $.ajax:
7 matches
Mail list logo