JQuery :: First()/last() Methods In The API Docs Website?
Jan 21, 2010
I have been trying to discover why the first() and last() methods are not working in my jQuery 1.2 nor 1.3 tests. After searching for a while, I found the alternative way with filter() and eq(), but I still wonder why none of those methods work.
The API documentation [URL]... states that they are available since 1.2, but they won't work, I always get a "not a function" error. I also found a tracker entry [URL].. discussing the need for them, but nothing is clear from it.
View 3 Replies
ADVERTISEMENT
Mar 19, 2010
Why do the API docs keep changing format? Can we keep them in the old more organized format? Having a giant list of methods makes it difficult to find information.
View 1 Replies
View Related
Jul 23, 2005
How come my browser, namely ie6, can reload(or load from favourites) a frameset and remember which documents were loaded into the frames without a query string?
I need to capture this in javascript so I can make sure my frames are inside the correct frameset yet still allowing users to load up with a particularly favourite doc. This is not done using a query string, or does not appear to be, so how is it done?
For example I load a frameset doc named index.html which contains 2 frames namely header.html and main1.html, main1.html has a link which loads main2.html into it's own frame. Now I add to favourites with main2.html showing. Next I go to a completely different site, delete all cache etc and close down IE. Then starting IE afresh I load the saved favourite and with no query string it loads main2.html.
View 1 Replies
View Related
Sep 21, 2010
Does anybody know if it's possible to print a bunch of documents that are listed on a page without opening them? This may not be possible but thought I'd ask around first.
View 1 Replies
View Related
May 14, 2006
Can I use the XMLHttpRequest object to call a url which would generate a PDF and then display it to the screen?
I'm new to AJAX and I'm very interested in using it to asychronously bring back documents with a content-type that IS NOT text/plain or text/html (like a PDF or Excel document) and then display that document to the screen. I have a web application that dynamically generates PDF and Excel documents. A user may have to wait a minute for the new doc to be created and displayed to the user. I want to put an animated notice saying the doc is being generated similar to what you see when you execute a search on a search engine. I've tried using animated gifs (with frames, etc.) but they don't work. As soon as a request is sent for the PDF, the browser halts the gif in IE. If I could instead call the URL that will produce the PDF asynchronously, then I could display the animated gif and call the PDF at the same time. Once the PDF is generated, I want it to then be displayed to the screen.
View 9 Replies
View Related
Sep 21, 2010
I always wanted to know how to arrange uploading of multiple files without resorting to Flash. I actually even know a great example of such an upload form: [URL] (you need to be logged into Google Docs to see this) It definitely doesn't use Flash, but the source code is so obscure and clogged that i couldn't decipher it so far. In fact, all i need is a possibility to invoke a file load dialog with the ability to select multiple files, and after they are selected, be able to fetch their absolute paths on a local PC. I don't even need to actually upload them afterwards.
View 2 Replies
View Related
Nov 30, 2010
I have a ajax program on a page on website A. And I need to let it talk to a program on website B. I tried to put website B into the url of the parameter but it doesn't work.It gives me a "[objet XMLHttpRequest]" error.here is the code on website A:
[Code]...
View 1 Replies
View Related
Jan 31, 2010
About when to use setter methods. For example, I have this code
Should this be used like this:
I think a better question is when to use the .each loop? Since, the first line of code I have works fine.
View 1 Replies
View Related
May 18, 2011
Let's say I have a Javascript object that looks like this:
{
events: {
"comments:added": this.add,
"comments:removed": this.remove,
"comments:fetched": this.addAll
}
}
I'd like to add this method to it, either manually, using $.extends() or _.extends():
[Code]...
View 1 Replies
View Related
Dec 1, 2010
HTML5 brings two new methods to the js selector API: querySelector() and querySelectorAll(). These methods can be used to match elements against a group of selectors. I think, a lot of the functionality overlaps with jQuery selectors. My guess is that these new methods will be a few times faster than jQuery selectors because they are natively implemented. My question is, how will jQuery use these additions to the js selector API? Will jQuery selectors just encapsulate these new methods? If so, is this work in progress or..
View 1 Replies
View Related
Dec 24, 2011
I have a text field
<input type="text" id="f">
I transorm it to autocomplete widget$('#f').autocomplete()How to access widget's methods and properties by id of the field?I need to access initialized widget to call some of its methods, modify properties etc.
View 1 Replies
View Related
Nov 24, 2011
I've previously written an image carousel with lightbox and to be honest forgot about it for quite a long time. I've just been tasked with making a few modifications (I wrote this code about 6 months ago)
Now, the problem I have is that I now need to call the internal method from the ligthbox plugin.
I've tried setting a reference to this like this but it just won't play ball. I can see that the ajax feed gets called but unfortunately I can't then access it.
[Code]...
View 3 Replies
View Related
Aug 6, 2010
I'm trying to use delay() before changing the html contents of an object.Eg. myobj.text("Hi There").fadeIn().delay(2000).text("Bye!").fadeOut();The result of this is that it just shows "Bye!" then fades, without any delay. So delay() seems only to work only with effects methods (fade, etc) not with other methods.Is there any way of getting around this and making a pause between any type of method in a queue?
View 1 Replies
View Related
Feb 25, 2010
The following used to work with version 1.3.2
var x = $('#ElementID').val();
var x = $("'#" + "ElementID" + "'").val();
var eid = "'#" + "ElementID" + "'"; var x = $(eid).val();
Only the top one works with version 1.4.1
Similarly the following used to work with 1.3.2 but it doesn't work anymore.
var eid = "ElementID"; $("'#" + eid + " option[value='" + x + "']'").attr('selected', 'selected');
View 1 Replies
View Related
Aug 9, 2009
Here are the descriptions for the Ajax methods:
load -- Loads HTML from a remote file ...
ajax -- Load a remote page ...
get -- Load a remote page...
getScript -- Load and execute a local javascript file...
post -- Load a remote page...
So, if we want arbitrary HTML we have to use "load", but if we want a whole "page" (where is that defined?) we have to use "ajax", "get" or "post"? The "execute script" function (called getScript for some reason) only works with local "files"? I believe it will work with any URI (local or remote) returning JavaScript (assuming same origin policy of course), and whether it came from a file isn't known to the caller. These functions should describe the type of HTTP request they make, and skip references to "pages" and "files".
View 4 Replies
View Related
Oct 5, 2011
I am pretty excited in creating multiple methods within a single plugin. But how do we access a particular set of objects from any given method? Here is what I have so far and all i want to do is access the objects 'location' and 'background' when the DOM is ready...
*jquery plugin*/
(function($){
//call multiple functions inside of one large plugin that do different things!
var methods = {
[Code].....
View 2 Replies
View Related
Dec 3, 2010
Does anyone know if there is a significant performance difference between the below two methods of DOM creation in jQuery?
Method 1:
$("<div id='myId' class='one two three' style='width:100px; height:100px; z-index:1;' />").appendTo("body");
Method 2:
$("<div />").attr("id", "myId").addClass("one two three").width(100).height(100).css("z-index", 1).appendTo("body");
I imagine that when using the first method, jQuery does some string processing and eventually ends up doing the same thing as method #2. Is that correct? If so is there a significant performance cost for this? Overall I think the first method is better as far as readability goes but it would be good to also know its effect on performance.
View 2 Replies
View Related
Nov 11, 2011
I'm using the class= style of setting up Validation. I have everything working except: 1. the equalTo method for email and repeat email, and 2. the rangelength method of the length of the password. It turns out the documentation example of equalTo in the housing web page demo is incorrect.[URL]... You can put 2 different email addresses in and Validation will not identify the difference and does not create an error message.
I've tried several things, but can't get the class style to validate equalTo or rangelength. The 2 current expressions I'm using are:
class="required email equalTo:'#contactEmailAddress1' "
class="required rangelength[6, 12]"
For the email, required and email format properly validate, but equalTo does not. What should I change?
View 2 Replies
View Related
Oct 15, 2010
Could anyone please explain why my validation doesn't work? When I use only predefined validation methods everything seems to be fine, but when I use a custom method it doesn't do anything until I click submit and then cancels the submit with "$.validator.methods[method] is undefined". The debugger does never jump into the "noBefore" method, I got a breakpoint at the first line. I've tried to write the "notBefore" in quotes in the rules but that doesn't seem to help either.Everything seems to be right, though.
[Code]...
View 5 Replies
View Related
Jan 28, 2010
The javascripts files in my website are constantly getting injected with malicious codes which redirects my website
View 2 Replies
View Related
Dec 29, 2005
I'm trying to code a feature for my website using DHTML where the person viewing the website can rotate between viewing the positive/negative points of the website being reviewed. This example was in the publication called Using HTML 4 by Lee Anne Phillips. Code:
View 5 Replies
View Related
Dec 7, 2011
I have a set of functions that will transition/fade photos in and out as background images. Easy. But now I would like to run the same functions on a different html page with different photos (each different page represents a different JavaScript array).
I've been reading online on how jQuery methods can be called into functions. So my thought process is to create 2 methods (1 for the original images and the 2nd method for the other images).
So here is my base code which works...
$.landingpage = function() {
/*Enable background image cycles on landing page*/
var images=new Array('/image01.jpg','/image02.jpg');
var nextimage=0;
[Code]....
View 2 Replies
View Related
May 3, 2009
QUESTION: How does one control the order in which jQuery methods are called and executed when loading a page? BACKGROUND: This question has been simplified from my previous question on load order. As this appears to be a complex issue -- otherwise, it would probably have been readily addressed -- I could likely be satisfied by a link or two that points to a well-written document on this topic. PREVIOUS QUESTION: [URL]
View 1 Replies
View Related
Jan 5, 2011
I can't make jQuery methods (html, hide etc.) work properly on newly added elements (added via ajax). It's fine with the the current elements of the page but doesn't work on new ones! I am new to jQuery.
View 7 Replies
View Related
Mar 4, 2010
Here is my code.. I am trying to wrap TBODY in DIV to have scroll for the tbody.. but it is not working as I am expected.
<!DOCTYPE html>
View 3 Replies
View Related
Jan 25, 2010
I have an object on the document element that allows for other components to register with it, i have a custom event something along$(document).bind("register",function(thechild)..So in the child object when they are created i call$(document).trigger("register",this);And indeed i get the DOM object. However i'm looking for the plug in object, i want to be able to call methods on the passed childobject and access it's Config.Does that make sense? How can i write a plug in that is applied to various objects that also registers itself with an 'overseer' object on the document element in such a way that i can allow that overseer object to call methods on any registered child objects?
View 2 Replies
View Related