In prototype the cumbersome for:
for (i=0; i<10; i++) { ... }
can be written as
$R(0, 10).each(function(i){ ... });
Is there an equivalent of range in JQuery ?
CODES:
$().ready(function(){
function sample()
{
alert("This is sample function");
}
$("#button").click(function(){
t=setTimeout("sample()",2000);
});
});
HTML:
<input type="button" name="button" id="button" value="Call sample function with delay">
Once i click button sample function is not called with a delay of 2 seconds. I dont know whats wrong. Please notify me how to do this
Question: To call javascript function using setTimeout via jquery
Hi,
I have been trying to figure out how to use the jQuery BBQ plug-in.
I have been able to add it to my site by copying the code from the site but I'm seeing that if I have a form in one of my tabs, I can't post any of the results successfully.
Has anyone used this plug-in and gotten used to its functionality? I need help figuring out where to input my php code for form handling and have the results returned the page loaded in the tab.
I've built a jQuery selector for a function which looks like this:
$('html').not('.table-main tr[selected]').mousedown( function( e ) {
But somehow it is not filtering at all and i do not quite understand why.
Even if i just leave ('.table-main') for the selector i still trigger the function when clicking into the table... What is wrong with that?
Using document or 'body' instead of 'html' does not help, as document is not triggering at all with .not() and 'body' results in the same.
I'm looking for a jquery muliple file upload plugin that allows files to be uploaded asynchronously without using flash.
I found this one , but the problem is it is based on flash.
Are there any plugins that meet my requirements?
Thanks .
I'm looking for alternative JavaScript Libraries to learn as an alternative to jQuery, as I think it would be good to know more than one and so i can broaden what libraries I know.
I'd tried Mootools so far but am not sure what else is just as good.
Any ideas?
I've used Jquery Tools and Fancybox. But these plugins dont work properly in my school's template when using older browser versions like firefox 3.0.1.6
I need to try different plugins with the hopes of them working.
I have an HTML table which may contain thousands of rows (number of columns is not a problem here).
I would like to be able to browse this table easily and be able to do the following:
Decide how many rows will be presented
Jump to the next/previous X number of rows
Scroll the table using the scroll bars to any desired line
Be able to customize/extend easily this Javascript/jQuery code
Has anyone seen something similar ?
Thank you very much !
I have an HTML table having n rows and each rows contain one radiobutton in the Row.Using jQuery , How can i look thru these radio buttons to check which one is checked ?
I use jquery.hover to toggle a class when someone mouses over a link. On the iphone when someone taps the link, it toggles the class on, but it doesn't ever toggle the class off until they tap somewhere else.
I have a contenteditable element that I want to focus, but only insofar as to place the cursor at the front of the element, rather selecting everything.
elem.trigger('focus'); with jquery selects the entire element in chrome. How can I get it to behave the way I want, or is focus perhaps not what I'm looking for.
Thanks
Is there a way to hide a form from my users until they click a link and then the form drops down for the user to fill out, by using PHP or JQuery if so how? Is there a tutorial that will teach me how to do this?
Im doing some form validation on a website and I've tried to use JQuery Validator and it works find but isn't valid as it uses custom attributes. I've tried every which way to make it valid but it seems besides some other custom javascript, which is not an option, it isn't valid.
Has anyone come across one that is valid? Or some other way to make it valid? I've tried custom dtds, adding the attribute to the doctype but that leaves a ] on the page.
Cheers
I am looking for a good jquery pagination plugin to use in my aspx page....
I have the following parameters
StartPage,TotalRecords,NumberofPages... I would like my plugin to same as stackoverflow paging ....
Im using the following function to hide a series of forms on a page:
$('.ask').toggle(function() {
$(this).text('-').next('.addtitle').slideDown('fast');
}, function() {
$(this).text('+').next('.addtitle').slideUp('fast');
});
There can be anything from 0 to 5 forms on the page all with the class .ask
What I want to be able to do is to select one form NOT to hide, so the jQuery needs to hide all put one of the forms on the page randomly.
How can I achieve this?
How do I test to see if links are external or internal? Please note:
I cannot hard code the local domain.
I cannot test for "http". I could just as easily be linking to my own site with an http absolute link.
I want to use jQuery / javascript, not css.
I suspect the answer lies somewhere in location.href, but the solution evades me.
Thanks!
how would i select the following in jquery
<ns:text value="my value" />
i have tried selecting it like so:
1:
var x= $('ns:text').attr('value');
return x;
2:
var x= $('text').attr('value');
return x;
but nothing so far... i don't know if it is possible or not but ...
Thanks
Is there a case insensitive version of the :contains jQuery selector or should I do the work manually by looping over all elements and comparing their .text() to my string?
Guys,
Given the following HTML
<div class"myclass">10</div>
<div class"myclass">25</div>
<div class"myclass">50</div>
<div class"myclass">20</div>
I want Jquery to return the maximum value found on divs with class:"myclass". (This is 50)
I thought of using .find.text() will be a good starting point but cant figure out exactly how,
Help is greatly appreciatted,
Thanks
jQuery is great especially its plugin but I do not like to add a lot of script tags in my html. Is there something similar to dojo.require? So I can manage those plugins easier and cleaner.
Hi,
I need to target all links with a class of hslide and attach this to them. Any jquery guru's out there know how to do this?
onclick="return hs.expand(this, { slideshowGroup: 'groupC0', wrapperClassName: 'rounded-white', outlineType : 'rounded-white', dimmingOpacity: 0.8, align : 'center', transitions : ['expand', 'crossfade'], fadeInOut: true });"
Thanks,
C