sorted
alphabetically, by span content:
var sorted = $.makeArray($('#names span')).sort(function(a,b){
return ($(a).text() $(b).text()) ? -1 : 1;});
$('#names').html(sorted);
On Aug 25, 9:14 pm, Audrey Lee audrey.lee.is...@gmail.com wrote:
Hello,
Assume I have 3 span-elements:
div id
Hello,
Rails has a hash named params which contains information from my
current URL.
Does jQuery have something like params?
Related question:
What is the jQuery-way of getting data out of the current URL?
-Audrey
jQuery People,
Suppose I have this syntax:
$(a.someLinks).click(function(event){tellme();});
I want tellme() to handle the value of href of the clicked link.
What syntax do I put in tellme()?
I got this far:
function tellme() {
// does not work: alert($(this)[0].href);
// does not work:
(this);
});
function tellme(obj) {
alert(this.href);
}
On Aug 21, 12:53 pm, Audrey A Lee audrey.lee.is...@gmail.com wrote:
jQuery People,
Suppose I have this syntax:
$(a.someLinks).click(function(event){tellme();});
I want tellme() to handle the value of href of the clicked link.
What
charlie.grie...@gmail.com wrote:
$(this).attr('href')
http://docs.jquery.com/Attributes
On Fri, Aug 21, 2009 at 3:53 PM, Audrey A Lee
audrey.lee.is...@gmail.comwrote:
jQuery People,
Suppose I have this syntax:
$(a.someLinks).click(function(event){tellme();});
I want tellme
Hello,
I've been working with jQuery about 20 hours now.
I like it.
I am looking for a demo of putting an a-element inside a div-element.
This seems to work:
$(#div99)[0].innerHTML = a id='aInDiv99' href='#'I am in div99/
a;
I'd like to handle its click-event.
I wrote this:
6 matches
Mail list logo