JQuery :: HTML5 - Two New Methods To JS Selector API
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
ADVERTISEMENT
Sep 8, 2011
Are there any difference between class selector and ID selector
View 2 Replies
View Related
Aug 6, 2009
do you know if it is possible to use selectors for a video tag?For example:
$(this).find('div.misc').find('ul').addClass('thumb-fila').find
('li').find('video').each(function(){
});
View 5 Replies
View Related
Jun 5, 2009
I'm trying to find an example of a country selector (which also provides a state selector if USA is chosen) then you cvan select the city, any samples out there?
View 2 Replies
View Related
Oct 25, 2010
I found some code on this site to test and display the html5 caching process, but it doesn't seem to work when using jquery.
I get an error [code]...
View 1 Replies
View Related
Mar 8, 2011
This works:
$(function(){
$('#video').click(function() {
this.play();
});
[Code].....
nor does assigning a var to #video or any other trick. Im trying to get the video to play when another element is clicked so i cant use 'this' selector.
View 1 Replies
View Related
Oct 22, 2011
I am using the jquery plugin and want the validation to upload only extension .doc but it does not validates the HTML5 input file when the name has brackets.[code]
View 1 Replies
View Related
Sep 1, 2011
I have been pulling my hair out trying to figure out why my code wont work,
HTML:
<select form="addnew_show" id="v_id_edit" name="v_id">
<option value="1">The Townhouse</option>
[Code].....
View 2 Replies
View Related
May 4, 2011
I want to know how to Upload images or videos through drag and drop (jquery or html5 tools)
View 1 Replies
View Related
Nov 24, 2011
I have a question about the html5 videoplayer. I have made a videoplayer width own buttons and a volume control. But the volumecontrol doesn't work. The code of the volume control is bold.
<!DOCTYPE html>
View 4 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
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
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 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
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