jquery

jquery get only all html elements with ids

i have a div with many many html elements like other divs, trs, tds, tables etc is it possible to get all the elements which have an id? i know asking $("#test") will give me the specific element with this id but is it possible to get find("#") or something like this?! greetz ...

How to reenable event.preventDefault?

I have a web page which I have prevented the default action on all submit buttons, however I would like to re-enable default submit action on a button how can I do this? I am currently preventing the default action using the following: $("form").bind("submit", function(e){ e.preventDefault(); }); I have successfully done this using t...

How to stop event bubbling on checkbox click

I have a checkbox that I want to perform some Ajax action on the click event, however the checkbox is also inside a container with it's own click behaviour that I don't want to run when the checkbox is clicked. This sample illustrates what I want to do: <html lang="en"> <head> <title>Test</title> <script type="text/javascr...

Django admin custom javascript load order

I am using jquery to add a few features onto some fields in the django admin, inlcuding my code by using something like the following: class SomeAdmin(admin.ModelAdmin): class Media: js = ( "/static/js/lib/jquery-1.3.2.min.js", "/static/js/admin/app/model.js" ) ... .. . ...

JQuery - Slide Toggle automatically open the first item?

I have aJQuery accordian using the following JS. function initMenu() { $('#accordion ul').hide(); $('#accordion li a').click( function() { $(this).next().slideToggle('normal'); } ); } $(document).ready(function() {initMenu();}); And the following HTML <ul id="accordion"> <li><a class="firsthea...

How a Javascript Accordion Works?

Hi, I would like to create my own accordion component without using any AJAX toolkits, mostly for learning purposes. I am not sure quite where to start with this one. I'm assuming I would begin by creating div's for each section in the accordion. Perhaps each div would contain a header, which would be the actual button selected to mo...

How to pass a nested JavaScript object to ASP.NET MVC Action Method?

I would like to pass a nested JavaScript object to my ASP.NET MVC Action Method. Here is the code(simplified): $.getJSON('some/url', { index: pageIndex, pageSize: pageSize, filter:{one:'one',two:'two',three:'three'} },someCallBack(msg) ); I'm...

A really weird problem - site works in FF3.0 not in FF3.5

Can someone please look into this. http://bit.ly/9DmPX Click on showcase, then on the logo it should open a modal window with the logo, everything works fine in FF 3.0 but in FF 3.5 the tab switches from showcase to home after clicking the logo. But wait it is more weirder, if you observe, the first time you click on the thumbnail it ...

jquery ajax- How to check duplicate name

When i use blur function on textbox to check duplicate name using jquery ajax working fine. Here is code: function duplicate(data){ //alert(data); //successfully gives the value from the text input $.post("test.php", {name: data}, function (data){ if(data){ alert('duplicate name'); } }); } $(fun...

how to enable or disable anchor tag using jquery

Please Help how to enable or disable the anchor tag using jquery ...

How to find all elements that DON'T have specific CSS class in jQuery?

I would like to get all form elements that don't have a specific CSS class. Example: <form> <div> <input type="text" class="good"/> <input type="text" class="good"/> <input type="text" class="bad"/> </div> </form> What selector should I use to select all elements that don't have 'bad' css class? Thank you. ...

How do I find the id of a jquery autocomplete input from within the onItemSelect callback?

I'm using the jquery autocomplete plugin from pengoworks: http://www.pengoworks.com/workshop/jquery/autocomplete_docs.txt In the function called upon an entry being selected, I want to find out the name (id) of the input element. (Because the callback is going to be used for multiple autocompletes.) Code looks like this: myCallback =...

capture a Shift and Click event with jquery

Hello, I don't seem to be able to capture two events at the same time. I am trying to capture the Shift and Click (mouse click) event. I have no problem capturing each action separately but not the two together. Has anybody done some research on that particular problem. Cheers nawak ...

jqGrid with ASP.NET MVC problem displaying records

I am using Craig Stuntz article on Using jqGrid with ASP.NET MVC: Search and Formatting, http://blogs.teamb.com/craigstuntz/2009/04/27/38243/ Using HttpFox I can see the json data being returned successfully but it will not display in the grid. The displays fine, but with no data and page numbers. Can anyone see a problem with this $(do...

JQuery Swapping the Toggle of elements, one at a time

I'm new to JQuery and I'd like to know if you've got any idea regarding how to accomplish the following with JQuery instead of JScript: You have a group of a's within a top div: <h3> <a id="acer" href="#acerca">acerca</a> | <a id="cur" href="#cursos">cursos y clases</a> | <a id="cal" href="#calendario">calendario</a> | <a id="con" href...

jQuery - Are animations and jQuery scripts in general faster in IE?

My pages use jQuery and these are very fast in IE and Chrome. In Firefox 3 animations and other scripts are definitely slower, even if compared with IE6. I read that jQuery is optimized for IE. Is this the only reason? Are you experiencing similar problems? Thank you ...

Reliable way of querying for the "first" textbox with jQuery

I'm interested in writing a very generic script that I can include into my masterpage that would give focus to the first textbox on the page, regardless of the page layout and contents. Would something like this work? $(function() { $("input[type='text']:first").focus(); }); I'm worried that "first" is just whatever is the first t...

jQuery and radio button groups

In jQuery, I'd like to select all groups of radio buttons where there are no buttons checked. Or, is there a way in which I can select all radio button groups and iterate through the groups? I'm dynamically adding N radio button groups to a page and will not know, before hand, what the names of the radio button groups will be. ...

how to implement ajax popup with jquery in mvc view?

Suppose I have a view to display the list of employee like: <table> <% foreach (var item in Model) { %> <tr><td> <img name=<%="disp"+item.id%> alt="" src="../../Content/Disp.gif" /> </td></tr> <% { %> Then I want to set mouseover and mouseout event for the image to disp the employee info in a popup box. If the mouse is over the image...

Jquery Form Validation and Checking the values with Mysql Database through PHP Script

I have a form which has a input textbox and submit button. On submission of the form the textbox value should get pass to an php script and check the values whether it exists in the Mysql Database. If it exists then we need to show an alert box stating that "Entered Value is already exists, Try something new". If the value not exists th...