jquery

jQuery and java script

Is it necessary to learn java script before jQuery? ...

JQuery - which .js do I need to download just to use the 'toggle' functionality?

What's the minimum JavaScript I need if all I want to do is use the JQuery toggle functionality? I'm confused if I need to download everything from http://jqueryui.com/download Or if I can use just the base JQuery from jquery.com ...

jQuery $.hover used for submenus causing "bouncing"

I'm having some trouble with the jQuery hover method. Here's the relevant JavaScript code: $("#navigation > li > ul").hide(); $("#navigation > li").hover( function() { $(this).children("ul").slideDown(125); }, function() { $(this).children("ul").slideUp(125); } ); Here's the corresponding HTML: <ul id...

Jquery Loading problem on first load / hard refresh

hey everyone, here is the site SEE BELOW I have a slight jquery problem and I cant seem to figure out how to debug it. the strip of thumbnails is supposed to scroll when you hover over it. When the page loads, or it loads on a hard refresh, they dont scroll. If I refresh the page (normally, not a hard refresh), it works fine. Any ide...

how to use ajax link in a ajax return HTML unobtrusively

I have a page, with ajax URL on it, ofcourse this page is applying unobtrusive javascript, let's call this page A. <div id="pageA"> <a href="additem?id=1>Add this item</a> </div> <div id="items"></div> when i click that URL page B return a div with a URL that suppose to be ajax link. the return something like this: <div class="i...

using .index() inside a hover()

I'm having some trouble with using the .index() inside of a .hover() function. Thanks for any help. $("#myUL li").hover( function () { //this logs a li element as it should $(this).log(); //this reports that it's not a valid function, why? $("#myUL").index(this).log(); //when i do it this way... var foo = $(...

Jquery slideToggle IE problem

Hi everyone, i got my jquery slideToggle working for Firefox. Ok it's not perfect, because when it slides down the performance is somehow jumpy. I tried different workarounds, but noone helped that right. So first question is, what could cause this little jumpiness in my code. And then the bigger problem is the display in IE. IE6 and I...

How can I trigger the native(href) click of an a tag with jQuery or mootools?

In jQuery trigger('click') and click() seem to only trigger the onclick event. I want to simulate a click of an a tag without an onclick event. What I am trying to reach is to display a lightbox upon landing. The lightbox is attached to an a tag which needs to be clicked. Any ideas? ...

Triggering jQuery functions with PHP

Hey, So far during my site development I have been storing all my jQuery functions in an external .js file, below are two examples of the functions inside: // Loads the login form into the page. function loadLoginForm() { $('[name=loadLoginForm]').click(function() { $("#loadingImage").css({ display:"block" }); $("#mainWrap")....

Why is break point unreachable when using jQuery Droplistfilter

I am using this drop list filter on my Asp.Net Form. jQuery plugin DropListFilter The filter on the dropdownlist list works perfecty. <script type="text/javascript"> $(document).ready(function() { $('select').droplistFilter(); }); </script> <asp:DropDownList ID="ddlMonth" runat="server" CssClass="ddlStyle"></asp:DropDownList> <asp:R...

Creating nested elements in jquery

I'm trying to replace a div with created elements, going from: <div id='links'></div> to <div id='links'> <ul> <li><a href='#'>No</a></li> </li> </div> I want to attach a function to the link in the <a> element that I create. Creating the desired link is working, but wrapping the link in an <li> element and a <ul> element using the...

How do I make a Div move up and down while Scrolling the page?

How can I make a div element move up and down the page when the user is scrolling the page? (where that element is always visible) ...

What tools are available for documenting jQuery plugins?

Hi, I've recently started creating some jQuery plugins and I'm finding it difficult to document them with the documentation generating tools that I've found. I've tried: JSDoc, JSDoc-toolkit, JGrouse and a web-based tool also. My biggest headache is that my plug-ins are coded as one big anonymous function, and I'm having trouble getting...

Animating background color to transition through colors on html element causes 100% cpu load

Hi, I'm trying to create an effect where small dots on the html background gradually change color in an infinite loop. I have a 960px centred design so the background area can get quite large. My solution was to set the background-color to a default color then tile a square grey image with a transparent corner knocked out over the top ...

jQuery validation plugin not detecting blank field elements as invalid after they have been validated.

Form validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Test url: http://docs.jquery.com/Plugins/Validation How to reproduce: 1.) Click on the name text input. Enter "12345". 2.) Tab to the next field. Enter an invalid email such as "12345@". 3.) Click on the name text input. Delete the data in the field....

Why does returning false in they keydown callback does not stop the button click event?

I have a button and the following javascript routine. $("button").keydown( function(key) { switch(key.keyCode) { case 32: //space return false; } } ); as I understood it, the return false; would stop the keypress from being processed. So $("button").click(); would not be called. For other keyCodes this works as expected. For...

Dynamically added HTML does not dynamically remove with JQuery in Cakephp

Hi, We have a part list in the "garagecar/view/index.ctp" view page. The part list is populated with PHP when the page is first loaded. Each part has a remove button. When the user clicks "remove", the controller link removes the part while the JQuery/Ajax removes the HTML that displays the part in the index: $html->link(__('remove', ...

Use javascript to generate a templatetag based on events after document ready?

I am working with the new version of django-threadedcomments and making some progress; it integrates nicely with django's commenting system, however, I'm stuck and not sure how to proceed. For threaded comments to work, the user needs to select a comment to "reply to" and then the correct submit form is brought up (with the appropriate ...

passing json data on trigger

I am calling a service that return json data. script: $.ajax({ type: "POST", url: "/some/service", dataType: "json", success: function(response) { if (response.status == "ok" && response.messages.length > 0) { // obj is a jQuery object obj.trigger(SOME_EVENT, response.messages); ...

jQuery return $.get data in a function

Hello, I'm trying to call a function that contains jQuery code. I want this function to return the results of the jQuery statement. It is not working and I'm trying to figure out why. function showGetResult (name) { var scriptURL = "somefile.php?name=" + name; return $.get(scriptURL, {}, function(data) { return data; }); } alert (s...