jquery

how to compare two values with jquery?

i have to get them via a selector and add a class. <div class="count_1"> <span class="percentage">10 %</span> </div> <div class="count_2"> <span class="percentage">90 %</span> </div> if (parseInt($(".count_1.percentage").value) > $(".count_2.percentage").value)) { blabla } ...

Web Service returning xml data using jquery works fine on local but not on server

I am having a webmethod that returns some data.I'm using jquery to call that function with its Content type specified as XML.The problem is that it is working on local machine but not on server.The code i'm using is: var arrInputs = pnl.getElementsByTagName("input"); str = arrInputs[0].value; $.ajax({ type: "POST", ...

How can I configure the jquery ui date field to make it a good date of birth entry?

I have an entry I need to accept a person's date of birth in. I'm using a default jquery-ui date field but it is difficult for users to enter in a normal DOB using the graphical tools (typing it in is fine, but users keep trying to use the graphical tools of the date entry and get frustrated.) The problem is that there are only about 2...

Server vs. Client side form auto-fill

Lately I've been using client-side jQuery scripts to fill in forms when users edit records in a custom CMS I've built. Server side script is PHP. How to do it isn't my issue. My question to you is opinion seeking. My clients have to have javascript turned on to use my CMS which so far hasn't been a problem as most users don't take i...

Will existing JavaScript frameworks incorporate CommonJS?

JavaScript frameworks like Prototype, jQuery, YUI, MooTools, Dojo, et al. all seem to target client-side developers, with the focus on enabling common user interaction patterns to be implemented more efficiently and with less code. With the emergence of server-side JavaScript, do these frameworks intend to incorporate the CommonJS stand...

div shadow with jquery

Is there any plugin for use a shadow effect on a div? thanks ...

Custom subgrid row names in jqGrid

I've been looking for a way to specify the cell name for sub-objects in jqGrid, however I have not reached any information in the documentation. For example, my JSON result might look like this: { 'id': 32, 'company': 'Best Company Ever', 'subaffiliates': [ { 'id': 13, 'company': 'Second Best ...

jquery - show/hide div based on multiple selections

I have a (php/html/jquery/css) page where i'm displaying tags at the top (e.g. green, white, fruit, vegetable) On the page I have divs marked appropriately with classes: <div class="green fruit">apple</div> <div class="green vegetable">broccoli</div> etc. I'd like to show/hide divs based on which tags have been toggled show/hide. B...

Convert a jQuery object and contents to string?

I'm grabbing various jquery objects to put into an array and later spit out as HTML. I'm trying to convert the jQuery object to a text string so it can be spit out as HTML later. I'm using this technique at the moment: console.log($myObject.clone().wrap('<div></div>').html()); However, that only appears to be grabbing the contents o...

CSS / jquery if() css effect

Not sure why this isn't working... I have several DIVs with an class of .rightColumnButton. A few of them have a height of 30px: .rightColumnButton{ height:30px; width:206px; margin-top:20px; } I want to change the margin-top to 10px if they have a height of 30px: $(function(){ if($( '.rightColumnButton' ).css("height") == "30"){ ...

Clicking A tag in IE6 and FF using jQuery

I have a div that is returned from an ajax call which contains an a. I need to click it in javascript, however I cannot find a way that works in both IE6 and FF. This works in FF but generates an object required error in IE6: $('#mylink').click(); This works in IE6 but generates a $("#mylink").get(0).click is not a function error in ...

jQuery vs. Yahoo UI API design

I am baffled by the difference in design between jQuery and Yahoo UI APIs. Disclaimer: I have a strong dislike of the jQuery api, but I am also a huge ignorant in web programming and javascript in general, so I could be dead wrong and come back here begging for redemption. so long... The point of my question is the following. The two de...

jQuery Ajax - Status Code 0?

For some reason, my Dashcode developed application has just stopped ajax'ing and returning status codes of 0. Does anybody have any idea why.. has this happened to you? ...

unable to remove row from table created by jquery

hi, i am creating a table based on result from servlet, which contains a checkbox , when the cheked property of checkbox is true there will be one button in the bottom of the table which calls for a remove function, which removes that particular row from table, this function is working when the table is created inside jsp using server ta...

Is jQuery compatible with ExtJS?

I believe Ext.js was using jQuery, but I'm not sure. Does anyone know if there is full compatibility with jQuery and Ext.js? ...

Why does my jQuery event handler fail when attached to multiple elements?

I am using jquery to add mulitple new "addTask" form elements to a "ul" on the page every time a link is clicked. $('span a').click(function(e){ e.preventDefault(); $('<li>\ <ul>\ <li class="sTitle"><input type="text" class="taskName"></li>\ <li><input type="button" value="saveTask" class="saveTask button"><...

IE6 crashes with this jQuery

The following code crashes IE6 every time. It keeps refreshing the page and crashes after a minute: $(window).bind("load resize", function () { var hnf = $('#header').height() + $('#footer').height(); $('#main').height($(window).height() - (hnf)); $('.fluid').height($('#main').outerHeight()); $('#content').width($('#main...

JQuery newbie - dialog

Hi there, I'm trying to use the jqueryui dialog (http://docs.jquery.com/UI/Dialog) within my html page. Has anyone got any links on the web to the javascript libraries needed to use the dialog widget? My HTML code taken from (http://jqueryui.com/demos/dialog/modal-message.html) is below - I think linking to the javascript libraries is...

jquery change text color? is there a code for this?

When I hover a text with animation definitely I will use jquery. Is there a code that will change the color, or size? ...

Embed youtube video without youtube link

as you know that when you Embed youtube video in your web page, it works fine , but if you click on any part of screen, youtube website will open in new window. is there any way to Embed youtube video in our website, but disable that youtube website opening when click on screen to pause the video? or you can play you tube video in othe...