Skip to main content

Home/ jquery/ Contents contributed and discussions participated by pagetribe .

Contents contributed and discussions participated by pagetribe .

pagetribe .

Create simple tooltips with CSS and jQuery - Part 2: Smart Tooltips | Kriesi.at - new m... - 0 views

  •  
    $(window).scrollTop();
pagetribe .

Tutorials:Edit in Place with Ajax - jQuery JavaScript Library - 0 views

  • var t = $(obj).parent().siblings(0).val();
  • “The obj (save button) has a parent (a div)… go find it. This object has one or more objects on the same level of the DOM tree… I want the first one. And grab the value of that object.”
pagetribe .

Working with jQuery, Part 3: Rich Internet applications with jQuery and Ajax : JQuery: ... - 0 views

shared by pagetribe . on 17 Dec 08 - Cached
  • // hides every other <p> on the page $("p:odd").hide();
  • // place a username and password input field on the page <input type=text id="username"> <input type=password id="pass"> // call a server-based PHP file that will process the information passed to it $.post("myFormProcessor.php", {username: $("#username").val(), password: $("#pass").val()}); // conversely, this PHP file could also return information to the function, from which // you could process the results $.post("myFormProcessor.php", {username: $("#username").val(), password: $("#pass").val()}, function(data){ // the data variable contains the text returned from the server, you don't // have to set anything up ahead of time, jQuery will do it all for you if (data != "ERROR") $("#responseDiv").text(data); } );
  • What does this mean? Well, based on the ability to load any Web page, and then parse it with jQuery, you have at your hands a very effective and easy-to-program page scraper, from which you can gather any type of information from any page.
  • ...1 more annotation...
  • <%=message.id %>
pagetribe .

Working with jQuery, Part 2: Building tomorrow's Web applications today - 0 views

shared by pagetribe . on 17 Dec 08 - Cached
  • // In this example, each row in a table will get a red background when // the mouse moves over it and a white background when the mouse leaves. $("tr").hover(function(){ $(this).css("background","#0000ff"); }, function(){ $(this).css("background","#ffffff"); });
  • attr(name)
  • // will change the image source, and the image displayed on the page will change $("img").attr("src", "myimage.jpg");
  • ...5 more annotations...
  • // use the val() function to get the text inside the textfield
  • // change the background of every div to red $("div").css("backgroundColor", "#ff0000"); // - or - $("div").css("backgroundColor", "red"); // - or - $("div").css({backgroundColor: "#ff0000"}); // notice the braces and lack of quotes
  • see the problem with them
  • You would definitely not want to place style code into the JavaScript code if you can help it.
  • <img src="/images/space.gif" id="spacer" class="a b c" alt="blank"> // Calls to the attr() function will return the following $("#spacer").attr("src"); // will return "/images/space.gif" $("#spacer").attr("alt"); // will return "blank" // Similarly, you can access the ID in the same way $(img).each(function(){ $(this).attr("id"); // will return "spacer" });
pagetribe .

Working with jQuery, Part 1: Bringing desktop applications to the browser - 0 views

shared by pagetribe . on 17 Dec 08 - Cached
  • $("p").css("background", "#ff0000");
1 - 13 of 13
Showing 20 items per page