jquery

Sense proximity to certain div

I was wondering with jQuery is it possible to have a div. then the closer you get to it move a certain amount up, so using CSS "top". Is it possible with jquery to sense the mouse position to the with my image. I would use it here: http://ryancoughlin.com/hp/index.php - the spider in the top left. What would I look in to for that? Any ...

Javascript date picker for displaying one week only?

Hi, I am looking for a Javascript-based date picker that would allow me to display one week only (instead of the current month). Ideally it should be one that can be expanded to a full month view if necessary and back again. Also, (css based?) design customizability would be a plus. A jQuery solution would be preferred. I've had a...

Mixing JQuery's toggle() with #anchors

Hey there, I have the following dilemma: I have a set of DIVs with child DIVS within them that are hidden by default. Initially, I was using javascript and onclick with anchors to achieve both a toggling and 'move-to-anchor' effect. Now that I have moved to the JQuery alternative, I am having problems reproducing the same 'move-to-anchor...

Parsing XML with CDATA with JQuery

Edit: I was missing two things here. The lack of "Content-Type:text/xml" in the header returned by the AJAX call was preventing JQuery from treating the returned data as a document. Once that was handled correctly, this code parsed correctly and output just the index and project name. $("a.getprojects").click(function(d){ d.preventD...

jQuery: Sustain a hover over two elements

I have an <img> that, once hovered over, animates and fades in the <div> of a larger version of the picture, along with text and a hyperlink. When mousing out, the <div> animates and fades away. This works fine, only my hover function only pertains to the <img> itself. As soon as either a) the <div> appears over the <img>, or b) one mous...

Fading issues in Internet Explorer 7 when using jQuery

Hi, I'm using jQuery on a site that I'm working on and everything works fine - except in Internet Explorer 7 (and previous versions, but the site doesn't support them). Take a look at http://dev.staffanestberg.com/fromsweden/ either in Safari or Firefox, then in IE7 and you'll see what I mean. I'm currently using the built-in effect Fad...

Selectable Table Row Jquery Asp.net

Hi all, I would like to create a table where the rows are selectable via jquery. I'd also like to pass certain table cell values from a double click event on a row to another page. Does any one have examples of how this would work? Thanks in advance ...

Prototype and jQuery interference

I have a lot of jquery code and a little .js script that use prototype The problem is when i try to call the $$ method in prototype i got the error : $$ is not define So i like to know the long hand method to get the $$ work $$('table.'+triggerClass).each(function(t){ is there a way to force that part of the code to use prototype, a...

Silverlight Video Stretching

What I want: To be able to resize the actual video inside the SL player with JS as I drag the corner. What I have so far: http://resopollution.com/granicus/silverlight_test/test_silverlight.html (try dragging the corner, it crops the video, not resizing the video). I'm using jquery to dynamically resize the outer div and the OBJECT tag ...

jQuery Multiple Event Handlers - How to Cancel?

I have two functions bound to a click event at two different times (using jQuery). The order in which they are fired is significant. They are firing in the correct order. The problem is, when the first function returns false, the second function is still firing! How can I properly cancel the event? Example code: $(document).click(f...

JQuery Object to String

How do you get convert a JQuery object to string? ...

In jQuery, want to remove all HTML inside of a div

I have a div, and I want to remove all the HTML inside of that div. How can I do this? ...

In jQuery, I am returning HTML in a JSON result, what do I have to escape?

In my Ajax request (using jQuery) I am returning a JSON response. So json.Html will have a string of HTML I want to append inside a div. On the server side, do I have to escape the HTML at all? In my MVC action, I am returning: return Content("{html: ???????}, "application/json"); ...

Jquery: Jquery not working in onunload event

Hi, I am trying to send an ajax request in the onunload event of a page. I am using the $.post function of jquery, but when the event actually fires i get this error: "Microsoft JScript runtime error: '$' is undefined" Does this mean that the jquery library has been deferenced before the $.post function was called and so i will not lon...

jQuery Events params through chain

function first(a){ if (a == 'a'){ return false; } } function second(){ return 'a'; } $('.c').click(first).click(second); How to send message to other chained events? Or stop others from one? ...

jQuery: performing operations on an array of objects?

I have 4 jQuery objects (i.e. things constructed via $("ObjectID")), and I would like to perform the same operation to all of them, in an elegant fashion. I would have thought that something like these would work, but it doesn't seem to: $([obj1, obj2, obj3, obj4]).change(function() { otherObj.show(); }); $([obj1, obj2, obj3, obj4]).att...

jQuery animate problem

I have this jQuery code that slide an "em" tag up, on hover, and down on blur: $(".entries a").hover( function () { $(this).find("em").animate( { height:"100%"}, 500 ) }, function () { $(this).find("em").animate( { height:"0%"}, 500 ) } ); html code <div class="entries"> <a href="http://www.website.com"&gt; <em>Descri...

Call URL before closing of Browser Window

I want to call an URL in the unload-Function of a Webpage but in the unload-function the get request is not working. My code looks like this: $(window).unload( function () { jQuery.get("someurl") } ); We want to be informed about the closing of the window for some logging of user actions. Is it possible somehow? If i add an alert...

Jquery UI Tabs & jcarousel conflicting in IE

I've both the UI Tabs & jcarousel plugin in my webpage, all works good in all browsers apart from IE where i assume there's some sort of confliction as if i take out the jcarousel JS then the tabs works fine. Has anyone got any suggestion on this issue or how to fix it? Thanks <script type="text/javascript"> $(document).ready(function...

Maddening IE javascript problem?

I have a page that uses a bit of jQuery and an effect called 'kwick' - in my sample page hosted at http://www.batsumaru.com/main.html it worked fine in all browsers, no problem. But when the actual code was produced at http://www.batsumaru.com Internet Explorer shows a script error (object does not support). I tried my best to debug but...