Hi
The question has been posted several times and is how to delay an addClass.
I got this:
$("#menu ul li").hover(function(){
$(this).addClass("hover");
},function(){
$(this).removeClass("hover");
})
And want something similar but where the class is added after 500msek or so. Best answer so far is this one using settimeout. Mayb...
The following code snippet works in FF but not on IE8. Prev is returning correct element but not as an object that supports val(). Hence, I can not run .val() on it.
<input type="hidden" name="data[De][1]" value="1" id="De1" />
<td class="dr_name">document1</td>
<td class="remove_dr" colspan="2" align="left">
<a href="javascri...
Hay Guys, I'm using the Cycle plugin for a gallery. The plugin has a function that can be run after an image has been show
prevNextClick: function(isNext, zeroBasedSlideIndex, slideElement){
SlideIndex = zeroBasedSlideIndex + 1;
$(".count .c").empty().append(SlideIndex);
},
after: function(currSlideElement, nextSlideElement, opt...
When i write a function in JS or jQuery and a parameter is required, i use the if something.length trick...
this.example = function(e) {
if ($(e).length) {
/*blablabla*/
} else {
return false;
}
}
But i dont want to do this in all functions. Is there a way to generalize this?
like:
this.ck = function(e) {
return fun...
hi
i want to create a multi-field chain search module in joomla using jquery like in this site left corner. If is there any tutorial please put the link here
Thanks
...
Hi - I"m looking to add rich-text in-place editing to a project (so people can see the results of their editing rendered straight away), and so am on the hunt for a rich-text editor that has an inline mode, or a way to use a rich-text editor for inline edits.
I've come across the neat-looking http://inplacericheditor.box.re/demos, but i...
I have this object/array thing:
var states = {};
states["CA"] = new State("CA", "California");
states["AR"] = new State("AR", "Arizona");
....
How can I check if states["AL"] has been set or not? Will the following work (in all browsers)?
if (states["AL"] == undefined)
alert("Invalid state");
...
Hi folks, looking for some help please with the JQuery CSS selector. I want to identify the first and last LI from the main UL list and alter the CSS class. The first should be
class="grid_4 alpha"
and the last
class="grid_4 omega"
<ul>
<li id="linkcat-2" class="grid_4 this should be alpha"><h4 class="widgettitle">Blogroll</h4>...
OK, I have a need to send a large request to a server running ASP::PERL and to have the server post back progress to the calling page. Basically -> tell server to upload a whole bunch of files in a file share, then update a div on the client as each file is checked for error/uploaded/success or fail.
Is there a way to put some callback...
I am trying to fetch the events data through a URL which will return JSON data.
The same code is working with jQuery 1.3.2 but not with jQuery 1.4.1
I am getting this error in FireBug console
a is undefined
for (var i=0; i
fullcalendar.js (line 369)
I am getting the JSON data as I can check it in response header of FireBug
jQuer...
I need to have a script on a page which dynamically changes the current week. I need to have the show "Week of February 15, 2010.
After next Sunday, I'd like the page to say "Week of February 22, 2010". I picked Monday for the display day but it could easily be Sunday.
Any suggestions are much appreciated!.
...
If I have a few checkboxes like the following:
<input type="checkbox" onchange="foo(bar);" /> Bar
Will the foo(bar); function only be called when the checkbox is checked on/off by a click or keypress (what I want) or if I progromatically check/uncheck a lot of checkboxes with a select/unselect alll button, will it then call the onchan...
Hi. I am developing a mega menu for an ecommerce site. I have uploaded the current version here: http://www.nicklansdell.com/menu/. The menu works great with or without javascript at the moment. What I would really like is to improve the usability when the user have javascript enable by creating a short delay before the menu animates out...
i got these two in the DOM:
<div id="buffert">
<span class="left"><a>link</a><a>link</a></span>
<span class="right">Some text<span>title</span></span>
</div>
<div id="final">
<span class="left"> </span>
<span class="right"> </span>
</div>
i want to move whatever elements within the div#buffert span.l...
I have this code
var myObjects = {}; //global variable
//Later on in the code:
for (i in myObjects)
{
var obj = myObjects[i];
process(obj);
}
function process(obj)
{
$.getJSON("example.com/process/", {id: obj.id}, function(result)
{
//Will the following change the permanent/global copy e.g
// myO...
Is there a way to make jquery wait a certain about amount of time before mouseout event is fired?
It is firing too early at the moment and I'd prefer to wait 500ms before it evaluates the mouse out. An example of the code I'm using below.
$('.under-construction',this).bind({
mousemove: function(e) {
setToolTipPosition(this,...
My problem is, that the browsers' (IE&FF) autocomplete does not work for my login form.
I have a webapp with CakePHP & jQuery. To allow visitors to login/register unobtrusively. The login form is inside a div, which is loaded via AJAX. (This enables logging in without a page reload.)
The browsers do recognize it as a login field, as th...
Here's the problem:
I'm trying to do an Active Directory Explorer with Asynch. jQuery TreeView. In standard ASP.NEt it was fairly easy with builtin TreeView and some events in code-behind.
The problem is that I don't exactly know how can I pass different arguments depending on which treeview leaf is being expanded. Based on this exampl...
I have the following javascript code:
$.get("categories/json_get_cities/" + stateId, function(result)
{
//code here
}, 'json'
);
And the PHP code which processes it basically outputs something like this:
function json_get_cities($stateId)
{
//code here
echo json_encode(array('citie...
Hi i'm using the jQuery mousewheel extension
and it uses the following bind
$('html').bind('mousewheel', function(event, delta) {
window.scrollBy(-120 * delta, 0);
return false;
});
The delta is determined by the mouse wheel movement and the page scrolls horizontally.
All is fine except when you move the cursor on an empty s...