jquery

Run a javascript function on script load

I am using jQuery. I keep all of my function definitions wrapped in the $(document).ready event in application.js. I have a function from it that I would like to call somewhere in the body of the page I am working on. I was wondering if there is some alternative to the .ready event that will work on a script load. Ideally I would l...

jquery listener don't "listen" to events on DOM elements dinamically created

Hi, i have a listener like this: $('.delete').click(function() { ...some stuff }); also, on the same page, another script dinamically add elements to the DOM in this way: $('#list').append('<tr><td><a class="delete" href="#">delete</a></td></tr>'); my problem is that the listener doesn't "listen" to these dinamically created ele...

onMouseOver not working fine with hover

Hi, i'm trying to get a popup window when hovering a div by calling the following function onMouseOver function PopUp(h) { $('#task_' + h).hover(function (evt) { var html1 = '<div id="box">'; html1 += '<h4>Taskbar ' + h + ' ännu en test - fredagstest </h4>'; //html += '<img src="Pictures/DesertMini.jpg" alt="...

jquery full calendar

hello everybody. I am new to fullCalendar and i do not kno how to use gotoDate method. What i have is a tabbed page with 12 tabs (every tab is a month of the year). What i need is when i load jquery calendar, foreach tab, the calendar to switch to the month that is assigned. (e.g when i click and load page for January the calendar shows...

cross-browser text (blur) shadow..

How to get cross-browser text (blur) shadow? including IE6, 7, 8. is there any css or js solution? I want to get text-shadow with semantic and valid markup. ...

jQuery Bounce ignores positioning

I'm having a problem trying to use the jQuery effect "bounce" on an absolutely position div inside of a relatively positioned div. The #Bounce div is positioned to be slightly above the container div and when a certain message is received it is supposed to bounce on top of it. But what ends up happening is that the #bounce div drops down...

Jquery Css Selector Add Value

How can i reset a display:none and add some value here is the code onclick="$('reason{$test->id}').css('display:block'); $('#reasonid{$test->id}').val(this.value);" ...

HTML table manipulation using jQuery

I'm building a site using CakePHP and am currently working on adding data to two separate tables at the same time.. not a problem. The problem I have is that I'm looking to dynamically alter the form that accepts the input values, allowing the click of a button/link to add an additional row of form fields. At the moment I have a table ...

ASP.NET MVC jQuery ajax call returns status code -504 instead of 5xx on Safari 4

My MVC controllers return 5xx status codes to indicate errors when called using jQuery ajax. This works great on IE8 and Firefox. However, on my copy of Safari 4.0.5 running on Vista, this breaks. It looks like Safari is translating my 5xx status codes to -504. Successful ajax calls work fine, and I've already tried uninstalling and r...

jQuery fadeIn and fadeOut not working in Internet Explorer 6, 7 or 8?

Hi Im using jQuery fade in/out on divs which contain images and text. It works fine in Firefox, Chrome and Safari however the effect doesn't appear to work at all in any Internet Explorer. The image disappears on fadeout the number of milliseconds I specified, but it doesn't fade. Are there any special rules for using this in Explorer? ...

Cross domain AJAX requests using JQuery and YQL

Hi , I need to use YQL (Yahoo Query Language) to perform a cross domain ajax request then bind the XML response into a JSON object and retrieve a value from the XML. The link shows how this is done using the YQL service as a proxy for cross domain requests: http://ajaxian.com/archives/using-yql-as-a-proxy-for-cross-domain-ajax For e...

jquery validate - validating a field on pageload

Hi there, I've got an input field on my plain html form that I would like to be marked as invalid (and the error message shown) from the moment the page loads. Is this possible to do with the jquery validate plugin? Failing that, how can I hide an element when the plugin tries to validate a particular input field? ...

Should we be using JQuery for Mobile AJAX Page Navigation?

I am developing a mobile site that will load page content using AJAX if JavaScript is enabled. I have been using the JQuery load() functionality to load page contents from other static pages but I feel I am wasting precious bandwidth loading the entire JQuery library when I'm only using a small piece of it. With this said should we be av...

Toggling between image

Hi all, I have two images with which I am using in an anchor tag. I am using jquery toggle on the click event of the anchor tag to swap between images. $(document).ready(function(){ $('#registrationForm').hide(); $('#callform').append("<a id='formlink'>IMAGE 1</a>"); $("#formlink").click(function(){ ...

Run jquery image resizer after image is appended.

Hi all, I am using this jQuery plugin to re-size images. http://hirdet2.extra.hu/kepresize/ . $(document).ready(function(){ $('#content img').kepresize({maxWidth: 200,maxHeight: 150}); .... .... $('#content').append('<img src="pathtofile"/>'); }); However, these images are only being ap...

How do I create an if () mouse is over an element in Jquery?

I have some hover() JS code: $( '.leftMenuProductWrapper').hover ( function () { }, function () { }); In the second function, I need something like: If ($("#leftMenuWrapper2").hasMouseover){ do this }else{ do that}; I can't find any documentation on how to do it. EDIT: This appears to ...

jQuery: Toggling an image when toggling a DIV

Hey guys, I'm trying to write some jQuery that will toggle DIVs open and closed, and it's working, but I want an arrow that will change to "down" if the DIV is expanded, and "right" if the DIV is collapsed. What I have so far: $('.toggleHead').click(function() { $('#arrow').attr('src', 'images/icons/down.png'); $(this).next()....

jquery error() calls showing up in firebug profile

I am working on an ASP.NET application that make a lot of jquery and javascript calls and trying to optimize the client side code as much as possible. (This web application is only designed to run on special hardware that has very low memory and processing power.) The profiler in firebug is great for figuring out what calls are taking u...

jQuery validation plugin - removing elements

I'm using the jQuery validation plugin. On most of my input type... tags I have class='required'. When I submit the page, via JavaScript, the controls on the page that have this class are found. However, there are a handful of checkboxes that I don't need to validate. I've tried removing the class code completely from the input tag, ...

What does (function( $ ){...})( jQuery ); do/mean?

Hi, I am a bit new to reusable plugins for jquery. I have ran across this code several times and can't figure out exactly what is going on. (function( $ ){ ... })( jQuery ); Can any one enlighten me? ...