jquery

Event Handling order

javascript jquery event handling if on event (for example 'click') binded one function for parent element and another handler function for child DOM element, which of them are called? If all of them will be call in which order? Thank you! ...

why jquery's ui.css files's font-sizes are bigger than normal?

Hi all, Im looking at jqueries tabs, datepicker etc and see that font-sizes of the classes added to elements are like 1.1em, 1em which seems big in the page. Why did they do this like that? What is the purpose? http://jquery-ui.googlecode.com/svn/tags/latest/themes/base/jquery.ui.theme.css ...

IE splice and join issues

I am using this code to alter the title of an image. Basically it should split the dashes (there will always be at least one) and take the first part as the title and the remaining dashes as the description. This works fine in FF but not in IE (tested in v8) it gives me 'Object doesn't support this property or method' on the descriptio...

'Activating' JavaScript for each page in large web sites

Hi there, I am working on a medium size web site that has plenty of custom JavaScript written for it. At present all the script is stored in seperate JS files for each area of functionality. These are then minified and combined into a single, large JS file during our build process. For each page, the relevant JavaScript is usually exe...

jQuery 1.4 vs YUI3, which one to choose?

jQuery 1.4 vs YUI3, which to use and why? ...

remove html table row by after checking chekbox that in row

How to remove using jquery html table row after checking checkbox that in this row? <table id="mainTable"> <tr> <th> name </th> <th> remove </th> </tr> <tr> <td> <input type="text" /> </td> <td> <input type="checkbox" id=...

jQuery.val() method failing to set value on a select list?

The following code failed when I upgraded to 1.4.1, and worked ok when I rolled back to 1.3.2. var ddlCountry = $("#<%= this.ddlCountry.ClientID %>"); if (ddlCountry.val() == "") { ddlCountry.val(address.country); ddlCountry.change(); } BTW the problem is that the value of the <select> list is never set. Yes, this is all ...

jquery autocomplete, how to parse a json request with url info?

I am using the jquery autocomplete plugin, but right now all it does is display a dropdown of rows that when clicked, injects the term into the input box. What I want is for it to have a hyperlink, so when clicked, it redirects to the page. Is it possible to return a more rich json request, that has other meta data like a url, image an...

Dropdown hover state

HTML: <ul class="dropdown"> <li><a href="#">Item 1</a></li> <li> <a href="#">Item 2</a> <div class="submenu">something</div> </li> </ul> jQuery: $j("ul.dropdown li").hover(function () { $j(this).addClass("hover"); $j('div.submenu', this).css('visibility', 'visible').hover(function () { ...

How do I display values of an JSON object?

Here is what I got so far. Please read the comment in the code. It contains my questions. var customer; //global variable function getCustomerOption(ddId){ $.getJSON("http://localhost:8080/WebApps/DDListJASON?dd="+ddId, function(opts) { $('>option', dd).remove(); // Remove all the previous option of the drop down ...

append after checkbox button, if select.value=enumType

$('#types').change(function() { var htmlToAppend = "<br/><input id='btnAddDictionary' type='button' value='Add Dictionary' />"; if ($("#types").val() == 'enumType') { $(this).append(htmlToAppend); //problem is in there debugger; } else { ...

[JQuery] Turning off draggable

Hello, I'm currently trying to create a desktop like homepage where using can move around panels. I've initialized these panels as draggable items in jQuery but I want them to only be draggable when in "edit mode" which is a flag I keep track of. Since I can't seem to figure out how to turn off draggrable items (disable isn't what I'm ...

problem with finding select element which id attribute Starts With

a want that, he found all select elements with id than begins with 'chbTypes' and write something like that $("input[id^='chbTypes']").change(function() { //some operations }); but it's not works. some idea, please. ...

jQuery insertbefore

I have the following: <table id="StateNames"> <tr> <td><input name="StateName"></td> </tr> <tr><td>Wyoming</td></tr> <tr><td>Wisconsin</td></tr> <tr><td>West Virginia</td></tr> </table> I'd like to $('input').change(function() { var StateName = $(this).val(); insert <tr><td>StateName</td></tr> before Wyoming ...

using ajax to create an authentication app but no return is being put.

when i click post the post response that i am getting from firefox is: (when i enter k for username) password username k Source: username=k&password= the print received from the php wont display in the #errorshow div here is my code (html) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt...

jquery, string, find

HI, Can somebody help me with this : This is my HTML: <div class="Breadcrumb"> <a href="#">Home</a>&nbsp;&gt;&nbsp; <a href="#">Projects</a>&nbsp;&gt;&nbsp; Projects Text </div> I want to get with jQuery the string what is not in anchor tag , in this example is "Projects Text" Theoretically something ...

Javascript: Div Only display once

Hello. So i want to do look a like stackoverflow with the message at the top. Now i have all configured and such, but i got one problem.. The message only displays 1st time, second time it doesnt appear. I know why, something about every id must be unique or something in a div.. And then i've used rand(1, 300); (php) and it still wont...

jQuery + Superfish + Supersubs + Prototype + IE = FAIL!

I am using the Superfish menu plugin for jQuery to display a vertical menu on some pages. I am also using the Supersubs.js plugin to make sure each level in the menu system is as wide as the widest LI element. I have taken the EXAMPLE.HTML file that is included in the download zip file and simply added the prototype.js library to the s...

Remove Alert box before it pops up

I am trying to remove an Alert box on an external site with Grease Monkey and jQuery. HTML: <!DOCTYPE html> <html> <body> <script>alert("Remove this Alert box with GreaseMonkey.");</script> <p>Hello world</p> </body> </html> GreaseMonkey script (currently without the jQuery part): // ==UserScript== // @name Remove Alert bo...

jQuery UI Tabs 3 and history plug-in

I'm using Tabs as follows: <div id='tabs'> <ul> <li><a class='tab' href="#tabs_company_info">Company Info</a></li> <li><a class='tab' href="#tabs_contact">Contacts</a></li> <li><a class='tab' href="#tabs_products">Products</a></li> </ul> <div id='tabs_company_info'> ... </div> <div id='tabs_contact'> ... </div> <di...