I'm building a small PHP/Javascript app which will do some processing for all cities in all US states. This rounds up to a total of (52 x 25583) = 1330316 or less items that will need to be processed.
The processing of each item will take about 2-3 seconds, so its possible that the user could have to stare at this page for 1-2 hours (or...
Before i tried loading the content via the .load() jquery function, i had an overlay which had various elements which were targeted with events, such as a close button and some tabs, which worked great!
I decided to keep my markup clean to load the overlay content with the .load() function which also works great, except the events that w...
I have a Magento site, which includes the prototype JavaScript library.
Some time ago, I added jQuery as well.
Before that however, I'd included a prototype based Lightbox. It was triggered by adding the attribute rel="lightbox[gallery]".
Now I'd like to make a lightbox appear on page load. I know nothing about prototype, so I tried c...
I am implementing jQuery Autocomplete and wish to display results with an associated image. Each image has the same name as the predicted result of the autocomplete field. i.e. If someone types "braz" then "brazil" appears with brazil.jpg inline beside it. I'm having trouble implementing this.
If anyone can point me in the right direc...
Hi, i'm sure this is just a simple one, but its got me stumped on a few different projects now.. i have to keep declaring my variables, and i'm sure there is a better way to be doing things.
in the example below, i'm finding at the "#gender" stage "gender" is printing out fine, but "#age" stage "gender" is no longer defined &/or is not...
Hi,
I cannot find out how to obtain destination element with jQuery UI sortable.
$("#pages").sortable({
opacity: 0.6,
update: function(event, ui) {
var first = ui.item; // First element to swap
var second = ???? // Second element to swap
swapOnServer(first, second);
}
...
$('#a').keyup(
function(event){
alert(event.keyValue)
}
)
but error,coz 'keyValue' is not undefined,
how do i get the keyValue when the event keyup???
i use jquery.
thanks
i do this:
$('#a').keyup(
function(event){
alert(String.fromCharCode(event.which))
}
but it alert the value of upper
ex:
i alert I
l ...
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<input id=a type="text" value='sss'/>
<script type="text/javascript">
$('#a').keyup(
function(event){
alert(String.fromCharCode(event.which))
})
</script>
you can test this code in your brower,
and it always alert UpperCase of a charcode.
...
I am wondering if there is a way to have "OR" logic in jQuery selectors. For example, I know an element is either a descendant of an element with class classA or classB, and I want to do something like elem.parents('.classA or .classB'). Does jQuery provide such functionality?
...
Hi,
I am using jQuery 1.3.2 and I was wondering if I could pls get some assistance on whether the following is achievable and if so, how can it be done - examples would be great.
Basically, I have an iframe src page that displays a report to a user. Now because it's in an iframe, there is no banner on that page but I do allow the user ...
I'm working on fixing up www.farawayflyfishing.com, which I used to learn CSS and JS a while back. Anyway, I'm moving most of the JS stuff to jQuery, and am using the jQuery Cycle plugin to do the main banner transitioning.
Here is my problem: There are constant elements in the images I am fading that I do not want to change. The previo...
I'm trying to build a screen that will be a hierarchical list of bookmarks, grouped into categories. The categories can be expanded/contracted to show or hide the bookmarks for that category. Right now I'm just working on the UI and using jquery for the first time (and loving it).
The methodology I'm using is sorta like accordion but ...
The way jQuery's .clone() seems to work, once you insert a cloned object somewhere, you cannot insert it again another time without re-cloning the original object. For example, if you do this:
var cloned = $('#elem1').clone();
$('#elem2').after(cloned);
$('#elem2').after(cloned);
Only one copy of elem1 will get copied and the second a...
I am adding tag at run time using jquery.
<a id=add class=add href=#>Test</a>
I want to fire the click event of this tag but it doesn't get fired.
I have already tried
$('#add').bind('click', function(e) {
e.preventDefault();
alert('hello');
});
but nothing happens.
...
I want to get type of input object but I alway got "undefined".
What is missing it this code?
var c = $("input[name=\'lastName\']");
c.val("test");
alert(c.type);
My form
<form action="formAction.jsp" method="post">
FirstName <input type="text" name="firstName" id="firstName"></input><br/>
LastName <input type="text" name="l...
Is it just me or do you feel the same? I find JavaScript and JQuery (especially the classical JavaScript) syntax very hard to follow, despite using these for a while.
However, I do find PHP, C syntax very easy to follow and understand.
Do you feel the same?
...
I am looking for a jQuery image gallery plug-in that supports custom thumbnails (filmstrip). Do you know one?
...
I have an A tag which triggers the animation of it's great-great-great-grandparent. All of the following will work, but which is most efficient, and why?
$(this).parent().parent().parent().parent().parent().animate(...);
$(this).parents(".foo").animate(...);
$(this).closest(".foo").animate(...);
I suspect that the first might be, a...
Having this button on my page:
<input type="button" id="Button1" value="OK" class="buttonClass" width="150px"/>
and using jQuery 1.3.2, if I run this command:
alert($('.buttonClass').attr('width'));
I get '150px' in all browsers but in IE (any version) I get '0'.
if I add a custon attribute in the button's tag, something like this...
I want to do validation of a password field on a login form. The requirement for the password is that the password should be combination of alphabet and numbers. I write a new validation function to fulfill above requirement and added it to jquery usding validator.addmethod(). The funtion code is as follows
$.validator.addMethod('alpha...