jquery

What is wrong with this simple jQuery slideUp and slideDown?

Hello, I want to display the image actual view when the mouse is over the thumb sized image. But when the mouse is placed over the first image it appears and then disappears, not the case with the second and following images. It works perfectly fine in IE, but not in FF or Chrome. $file - runs displays all the files in a directory $i...

How to restrict affecting range with jQuery?

<table> ... </table> <script type="text/javascript"> $(selecctor).click(...) </script> The above is to be dynamic loaded by ajax. What I want to do is restrict the selector so that it only affects the DOM within the table above it.I( can't assign an idto the table) EDIT To Gumbo's solution: <div id="container"> </div> <table> .. <...

jQuery ajax problem with IE6

Hi my problem is a bit wired: my $.ajax success handler looks like: function(data){ alert(data); } Pretty simple, yeah? The problem is that data IS ALWAYS 3 character long - no matter what was sent by the server! The characters: 31 65535 8 (using charCodeAt()). In other browsers (even in IE 8) all works fine. I've looke...

jquery load IE FF and Chrome

I was wondering why Chrome doesnt parse a page correctly when I add a page loaded by the .Load() method I integrate a page with full html, head and body tags and it just ignores everything there except my content. Making it impossible to integrate a jquery script... Am i overlooking something? Does chrome filter out the html, head and ...

How to make a div fullscreen and atop of all other elements with jQuery?

<div style="background-color:grey"> </div> Is there an easy way to do it? ...

how to fill a jquery autocomplete list with key value pairs from web service

Can somebody please give an example on passing key value pairs to a jQuery autocomplete list using a webservice. Tanks for the help. $('#txtBox1').autocomplete("Autocomplete.asmx/GetKeyValu", { dataType: "xml", datakey: "string", max: 10, minChars: 0 }); [WebMethod] public Dictionary<string,string> GetKeyValu(string q, int li...

1 million link elements in one page?

will it get "laggy" if i fetch 1 million link elements and put it in the DOM. cause i want a navigation list on top..its kinda like the one Apple's got on their site and you can scroll left or right with your keyboard. the only difference is that the center image will be get larger in size compared to the others. the link elements will...

Jquery OnSubmit If Checkbox is Checked Send an Email

I have an existing form that I would like to add email functionality to. There is a field in my form called "their email", and just under it a checkbox that asks "Send Them an email?". I would like a jquery script that would take the email from the "their email" field and email them (via an external email.php file) if the checkbox is che...

Send \n with jquery ajax

I made a little script that send a textarea content to PHP page with get ajax request: $.get('./data/pages/admin/actions.php?savepost=1','&post_id=' + $(box).attr('id') + '&text=' + new_text,'text'); new_text get content from textarea with val(); When I save the text from php it has no \n character. Some1 can solve my problem? Thanks...

jQuery logging in IE: how to get object?

Via Firefox+Firebug one can write out to the console a jQuery object and the console will, in great detail, show you what that particular object is referring to in the DOM. console.log($(mySelector)) In IE8, using the IE8 Developer Tools, I also have access to a console log, which will write out as above. However, just like doing an a...

Fix JQuery-1.4.1 and json-2.0 conflict in json.parse regex conflict with "$" character

After upgrading to jquery 1.4.1 i noticed there was an error anytime i tried calling json.parse. The issue is part of the regex used in json. it uses a $ in the pattern that conflicts with JQuery's $ shortcut. I don't want to use the non-conflict option with jquery because i have tons of places i'd have to replace the $ with the new cor...

jQuery - Best Practice for creating complex HTML Fragments

Is there a general best practice for creating somewhat complex HTML elements in jQuery? I've tried a few different ways. First I tried using createElement and chaining alot of those together with AppendTo and the like: var badge = $(document.createElement("div")).attr("class", "wrapper1").appendTo("body"); $(document.createElement("div...

jQuery :nth-child selecting just one?

$('.mydiv ul li:nth-child(4)').addClass("nth"); There are atleast 8 li's in there but it only selects 4th but not 8th? ...

How can I detect when a function is called as a jQuery callback vs. called directly?

I'm using hoverIntent which, as part of its settings, will call a function. I think this is called 'referencing a function' (correct?): var HIconfig = { interval: 250, sensitivity: 8, over: myFunction, timeout: 100, out: myOtherFunction }; However, I'd like to reuse said function at times and explicitly pass i...

Detecting Arrow key press in IE via javascript/jQuery

I'm trying to set up a menu that can be navigated via the arrow keys. I have this working fin in Firefox. Trying to get it to work in IE8 and after a bit of struggle, found that it was because IE8 wouldn't register a keypress on the arrows. To test: $(document).keypress(function (eh){ alert(eh.keyCode); }; In Firefox, pressing a...

Jquery Return Index Number For Each Item In Array and set that index at Rel Attribute Infinite Carousel

I am trying manipulate Jquery Infinite Carousel into dynamically resizing the image container based on the currently displayed image. I need to get the index of the Li element that contains the current image, but the problem is that Infinite Carousel removes and reorders the Li's automatically, which means that their EQ() properties are...

JQuery UI Accordion Jumps with CKEditor

Hi everyone, I have an accordion working just fine, but once I include a CKEditor in it, everytime the accordion tries to show or hide that DIV, the accordion jumps a little funny. All other DIVS work just fine when I try to hide or show them. Jquery: 1.4.1 CKeditor: 3.1 Jquery UI: 1.8 Does anyone can point me in the right direction...

Which is the best jQuery-powered site?

This "Top 10 JavaScript (jQuery) Powered Sites", posted about 2 years ago, was the one that invites me (after seeing the list) to use jQuery. All the sites in that list made me realize how cool it is to build sites powered by jQuery. And now more and more sites are being powered by jQuery. More and more developers are learning jQuery. T...

Trying to use JSON with jQuery

Hi all, I'm trying to get json working using jQuery 1.4.1 but I'm getting a null object. Here's an example of not working code: (using $.ajax which has the 'success:' ) $.ajax({ url: 'http://isohunt.com/js/json.php', dataType: 'json', success: function(data) { alert('Worked'); alert(data); } }); What i...

callback structure

Hi, I'm a little confused about the best practice to achieve the following: I have an object which requires the load of 2 JS libraries(jQuery and swfobject), who may be already loaded or not, so i have to check both before calling the final method (output). Another tricky thing is that i have to pass some arguments to the initial metho...