jquery

how to destroy myself(the div of dragging by me) when i droped.

$("#b").draggable(); $("#map_canvas").droppable({ drop: function() { //alert('dropped'); aFn(); } thanks ...

.hover fade image out, fade new image in. On exit return to original image

I have my company logo appearing in the footer of my site, when the user hovers over the footer I want the image logo.png to fade out, then biglogo.png to fade in - in its place. When the user moves the cursor away from #footer I want logo.png to fade back in. <div id="footer"> <div id="logowrap"> <i...

How to post a array of complex objects (that has a array of complex objects) with jQuery

I want to post some Products that has a ID and some Categories with jQuery. But I get a error in: Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder.BindProperty (NullReferenceException), when I add the Categories. Should not the default ModelBinder be able to bind this (without a ActionFilter or custom ModelBinder)? I tried ...

HtmlBox JQuery plugin

I'm using the HtmlBox 2.8 (http://remiya.com/cms/projects/jquery-plugins/htmlbox/) Turns the textarea to a richtext editor. when i change the value of the textarea, $('#Survey_Value').val(data.Value); the text in the richeditor does not change. how to change the text the text in the rich text editor? ...

How to detect a click or mouse press on IE with Raphael and jQuery

I'm trying to find a way to trigger an event when a mouse clicks on some text generated from Raphael JS. In Firefox, the click event works perfectly, in IE 7 and 8 (I haven't tested earlier versions) neither click nor mousedown work. Click works fine for other raphael objects, e.g. the rectangle in the example. How can I trigger an eve...

Problem posting data to asp.net mvc application using jquery

Hi, I've got an MVC application that accepts eitherJSON or XML objects dpending on the request type. This application is based on this article To call a method on the MVC application that requires a complex object, I use the following Javascript (JQuery): function GetUnassignedJob() { if (isInteger($('#txtDay').val()) && isInteger($(...

by jquery, after row click handler return first td attribute in clicked row

Hello, $('#myTable tr:last'); i get a tr content(without tr tag). how can i get tr attribute? I can't. then tried to get attribute er from first td on clicked row. and now same problem. $('#myTable tr').click(function() { var State = $(this).find("td:first-child").attr("er"); // this code is false alert(State); }); My HTML ...

Stop animation on hover/mouseover-for selected element ?

Im trying to replicate an effect as seen on http://www.fiat.co.uk/Showroom/#showroom/punto_evo/explore. I have made a function to animate the 'point of interest' markers which are absolutely posistioned within a parent div and when these markers are hovered over, the child div is shown. However i am struggling with adding the .stop()...

Jquery making div fadeout with timer

Looking to make a div fadeout after 10 seconds. Tried various things but can't get the timer working. This is the code: $('#deletesuccess').show(); Edit: This is the full code: function refreshTable() { //timestamp to get around ie caching issue var tsTimeStamp= new Date().getTime(); $('#deletesuccess').show().fadeOu...

jQuery Help - Appear underneath rather than on top

I have the following jQuery which I need adapting: $(document).ready(function(){ $(".rss-popup a").hover(function() { $(this).next("em").stop(true, true).animate({opacity: "show", top: "-60"}, "slow"); }, function() { $(this).next("em").animate({opacity: "hide", top: "-70"}, "fast"); }); }); CSS: .rss-popup { margin: 100px auto; p...

JQuery Queue Bound Events (those which can invoked by .trigger)

Hi all, I have a scenario where I would like to be able to defer execution of events that are attached to an element, in such a way that I would like to be able to ensure that all events on another element (a child element (in respect of the first element) and their children - and so on) are fired after all of the events for the pareen...

In browser can I get the image color where my mouse is pointing at?

Hi all: There is a web application for me to build, and rather than image map, I would like to try something more elegant. The story is, there gonna be a global map where different continents are denoted by different colors. Say Australia is red and Asia is green. Will there be a way that when my mouse is hovering on the shape of Au...

sending parameters to a jquery function

I have the following function which works very well within a $(document).ready(function(){ $('.threadWrapper > .littleme').click(function() { $(this).next().toggle(); $(this).toggle(); $('.littleme').not(this).next().hide(); $('.littleme').not(this).show(); // re-run masonry $('#mainConte...

Validate Jeditable field

I'm using Jeditable (posting to CakePHP) for input on my page. I want users to only fill in numbers in the Jeditable fields, so my idea was to also use the jQuery validation plugin to validate if only numbers are used, I already use this in other parts of my site. Jeditable dynamically creates a form with an input when you click on the ...

Event binding problem on select option (jquery)

I have a select with an option it with id 'option1'. option1 is the currently selected option on page load. In my $(document).ready, I have: $(document).ready(function() { $("#option1").click(function() { alert("Testing"); }); }); However, the alert is never shown and the event never fires! Is it not possible or s...

Paging with jQuery

I am trying to take data to one page from another. The problem is here is, data may be too long and divided into multiple pages. When the user clicks on 1, 2, 3, ... links he is redirected to the other page. However, I want data to be reloaded on the same page. With SLaks's suggestions I came up with the following code but it is not work...

In jQuery, should i use parseFloat(el.width()) or parseInt(el.width(),10)? which one is more preferred

I always had this question: When i dont mind the exact floating number Which one is preferred? parseFloat someValue = parseFloat(el.outerWidth())+parseFloat(ele2.css("marginRight")), parseInt someValue = parseInt(el.outerWidth(), 10)+parseInt(ele2.css("marginRight"), 10), Which method is easier for the JS engine? ...

jQuery Smooth Sliding DIV Height

I have a Div that is 400px in height with the ID "content", I then do a slideToggle on the Div, load some data into the Div of a varying height e.g. 200px, and then do another slideToggle. What I get is the slide expanding to 400px, then jump back to 200px. And the same in reverse, expanding to 200px, then jump to 400px. This is my code...

JSONP request using jquery $.getJSON not working on well formed JSON.

I'm not sure is it possible now from the url I am trying. Please see this url: http://www.heiaheia.com/voimakaksikko/stats.json It always serves the same padding function "voimakaksikkoStats". It is well formed JSON, but I have not been able to load it from remote server. Does it need some work from the server side or can it be loaded w...

comparing a date string to a date object in jquery

I have been passed a date string that looks like this: Thu%20Mar%2011%202010%2015%3A09%3A11%20GMT%2B0000%20(BST) I want to compare this date with today's date and hopefully ascertain whether the string above has happened yet. With my limited knowledge of jquery/javascript I wrote this: var str = new Date("Thu%20Mar%2011%202010%2015%3...