Hi,
I'm trying to create a looping animation that starts on onmousedown and stops on onmouseout. The effect is a simple scroll that will continue looping until you release the mouse.
I've created a function which performs the .animate method and it passes itself as a callback but the code only runs once.
Here's the entire code:
$(doc...
Using:
$('#foo').data('events').click
We are able to access an iterative object of click handlers added to the element '#foo' but only when they were added with .bind()
Is there a way to get the handlers for an event added with .live()?
Is there any other way to know if an element has a click handler assigned?
...
Im familiar with asp.net web forms. I would now like to move on to writing web applications that use AJAX.
I would like to get to the stage where I can create an app:
that has "edit in place" (no page reload) where i can reorder images using drag and drop (also saves the order to DB)
that has google like search suggestions while typi...
This is my code,
$.ajax({
type:"get",
//this doesn't work
//url:'http://example.com/json.php',
//But this works
url:'http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?',
dataType:"jsonp",
...
Hi, I am trying to load just the contents of a <div> into another <div> on the same page using a jquery function. But when the function triggers, it loads the entire <HTML> document into the specified <div>. Any idea why it would be doing this? My code is as follows:
Jquery:
function button1() {
$('#sidebar-content').fadeOut(functi...
Hello,
The problem I'm having is that if the fourth item has a long description, it cuts off as it goes below #features (due to a strict high in my design with the overflow:hidden.
What I was hoping is someone would have a suggestion on how to make the current item selected to move to the top?
Here is an example url: forums.wuggawoo.c...
HI everyone
I hope you can help me, I have a problem with a requirement, I need to make a list of images that go to cycle.
I have this website, here I have some business cards and I need the images to be repeated after the end of the first cycle and continue like a loop.
here I leave the website, look that the list has a final.
http...
I have a long task in Javascript that should be performed before the web page content is displayed. During the execution of this task I would like to show an image whose opacity will grow up to 100% (when the task is done).
How this can be achieved ?
...
I am working on a small bit of script that will allow for easy and flexible creation of buttons.
My buttons are made of three parts, a left, a right and a streched middle piece. There are three different sizes and three different colours of each.
I have written the code that resizes the button to fit the text. Now I am looking to add t...
jquery-1.4.2.min.js is 71.8KB
Same file compressed through this tool, with gzip enabled, becomes 32.9 KB
Which is better? If latter, why doesn't jQuery provide a packed file too instead of just uncompressed and min versions?
My Question: One is minified and gzip enabled, other is minified and packed and gzip enabled. Which should I use...
I want to load the lightbox javascript only when a certain condition is satisfied so I'm loading it using $.ajax like so:
$.ajax({ url: "../static/js/lightbox.js", dataType: 'script', cache: true, success: function() {
alert('loaded');
$("a.lightbox").lightbox({
opacity: "0.6",
width: "940"
});
}});
I see t...
Why in the following code I see the whole page at once ? Thanks !
HTML:
<div></div>
CSS:
div {
width: 100px;
height: 300px;
border: 1px solid black;
text-align: center;
}
Javascript:
$(function() {
for (var i=0; i<15; i++) {
sleep(100);
$("div").append("<span>--- " + i + " ---<br /></span>");
...
NOTE: This is a long question. I've explained all the 'basics' at the top and then there's some further (optional) information for if you need it.
Hi folks
Basically last night this started happening at about 9PM whilst I was trying to restructure my code to make it a bit nicer for the designer to add a few bits to. I tried to fix it u...
Hello all,
I am trying to make use of JQuery's remove attribute like this:
$('#rom-img_1').removeAttr('mouseover');
$('#rom-img_2').removeAttr('mouseout');
However, it does not remove the effects of the events as the events are still triggered on mouseover and on mouseout. I have tried adding "on" before the events names too but JQue...
Hi,
I'm trying to use jQuery to make an ajax request based on a selected option.
Is there a simple way to retrieve the selected option id (e.g. "id2") using jQuery?
<select id="my_select">
<option value="o1" id="id1">Option1</option>
<option value="o2" id="id2">Option2</option>
</select>
$("#my_select").change(function() {
...
Hi All,
i am having the textbox which needs to accepts only alphabets i tried with jquery mask but its only for numeric i can able to do , but needs to enter only alphabets in a textbox can anyone help me in this regard.
...
I have a script and when it detects a difference it plays a little alert sound. When it alerts the sound plays but loops, how can I stop this?
...
I am trying to use the goTo function to rotate between images, here is
my basic JS:
<script type="text/javascript" charset="utf-8">
$.jQTouch();
$(function () {
$('.touch').live('swipe', function (event, info) {
alert('called' + info.direction);
var id = $(this).parent()...
Say I have the following unordered list
<ul class="container">
<li class="item" style="display: none;">first item</li>
<li class="item">second item</li>
<li class="item">third item</li>
<li class="item">forth item</li>
</ul>
how can I carry out a task only if all the items in the container are hidden?
regards...
...
Hi there
I am hiding a bunch of textboxes and it works fine, the problem is, the textboxes are in a table, so I also need to hide the corresponding labels.
the structure is something like this
<tr>
<td>
Label
</td>
<td>
InputFile
</td>
</tr>
in fact its just easier if I hide the rows that have a fileinput , can someone help please
...