jquery

How to call getChangedCells method for jQGrid CellEdit

I can get the changed cell/row values using the following: var ret = $(”#grid”).getChangedCells('all'); // Return Rows or var ret = $(”#grid”).getChangedCells('dirty'); // Returns the changed cells. ...

Calling MVC Method from JQuery UI Dialog without AJAX

I currently make use of JQuery UI dialogs across my site. However, I've recently started to make use of the MVC TempData collection for notifications of success/failure of various actions triggered by my dialogs. Nothing particularly fancy or new. However, it's brought up an issue that I can't find a simple, obviously solution to. On so...

Validate Plugin - using the submitHandler

My apologies if you have already seen this or replied to it but I can't seem to find the question I originally submitted and i'm desperate for a solution. I need to display a promotional message when the user clicks submit if they meet certain criteria about their postcode. I have heard that you should use the submitHandler but being...

Jquery decode HTML entities

How do you use jquery to decode html entities in a string? or how do I stop jquery from encoding a string with html entities in the first place? ...

Display json variable via jquery

I want a variable of the json file to be displayed (Date) but it does not seen to work. What am I doing wrong? <script type="text/javascript"> $(document).ready(function() { $.getJSON("http://json-head.appspot.com/?url=http://www.trinum.com/ibox/chatel/images/photofull.jpg&amp;callback=?", function(data) { ...

Attempting to create a quick jQuery drop down menu..

Hi all, am not sure if I'm doing this right, but I'm trying to create a simple drop down menu in jQuery. I basically want a div (with links) to appear once the menu item is hovered over.. The Menu: <ul id="mainlevel"> <li><a href="#" class="mainlevel_home" ><span>Home</span></a></li> <li><a href="#" class="mainlevel_feature-writers...

Target all x elements with sibling y

Hi, how can I target all elements that have a sibling (and only those) in jQuery? <ul> <li> <a href="#">target</a> <ul> <li><a href="#">no target</li> </ul> </li> <li><a href="#">no target</a></li> </ul> Thanks, Max ...

height of page in javascript

I'm unable to get the height of a page in javascript when the page is larger than the screen. I thought this would get me the right height: $(document).height(); but that only gets the height of the screen, same as: $('body').height(); same as: document.offsetHeight; For some reason all these examples only return the height of ...

Serializing json objects while calling ajax asp.net callback page

I'm using asp.net page that is fully ajaxified (with jquery lib) and calling another asp.net callback page to get/post data to server. Some users of my page experiencing following error when serializing json object there was an error deserializing the object of the type ... object type ... contains invalid utf8 bytes $.ajax({ ...

Retrieve and display value of radio options via jQuery

I'm trying to have an alert box show the value of the radio option I have selected. HTML: <input type="radio" name="sex" value="Male" /> Male<br /> <input type="radio" name="sex" value="Female" /> Female When I choose one of those and set up and alert box to show me what i choose (as a test), it doesn't work. I know that other people ...

How to use Javascript math on a version number

I use jQuery to get the browser version like this: var x = $.browser.version; I get a string like this: 1.9.1.1 Now, I want to do an evaluation so if x is >= 1.9.1 then do some stuff. Unfortunately, with multiple decimal points, I cannot do a parseFloat() because it converts 1.9.1.1 to simply 1.9, and the if evaluation would match a ...

Correct syntax for defining an event delegator

Normally you write a handler for a button click like this: $(document).ready(function() { $("button").click(function() { doSomething(); }); }); But in the case of an event delegator, to respond to an event with a function such as this: function doSomething(event) { if (ev.target.id == 'button1' ) { /...

Using jQuery to circumvent tabindex problems

I'm trying to control my forms and how the user interacts with them via the form elements' tabindex property. All of my elements have tabindex specified, and I want this value to be respected and used properly. I'm currently developing on Mac/Firefox and I'm aware of the default Mac system setting that sets tab-switching to only input e...

jQuery menu

Hi, I am using this jQuery menu script: (function($) { $.fn.blowfish = function() { // hide original ul dom tree $(this).hide(); // create container from top-level li tags var top = $(this).children('li'); var container = $('<div/>').addClass('bfcontainer').attr('id', 'cv' + Math.floor(Math.random()*10e10)).ins...

jQuery - is it bad to have multiple $(document).ready(function() {});

Is it bad to have multiple $(document).ready(function() {}); on your page? I have a website where I load different things at different times. I fire off those partial postback functions inside $(document).ready() but i have about 4 or 5 on the page at once. Is this a bad practice? Specifically, will it cause any performance issues? ...

Double Clicking Table Cell Problem in IE8

I used jquery to attach a double click event handler to a table and display a modal popup when a cell is double clicked. This works fine in Firefox however in IE8 double clicking the cell causes the text in the cell to be highlighted then displays the "Search Accelerator" button over top of everything. Is there anyway to prevent IE fr...

registering clicks on an element that is under another element

I have elements that are under an element with opacity:0.5 that I want to be able to click on. How can I click "through" the topmost element? Here's an example that demonstrates my problem. Click on the boxes to toggle them on and off. You can edit it on jsbin to try out your solution. Bonus points if you can have the boxes toggle on h...

using JS to lock out a div

Hello, is there anyway I can use jQuery to lock out a div, ie, make the div grey out, on the submission of a button? $('#buttoncancel').click(function() { $('#radiodj').hide('slow'); } ); Currently, that hides the radiodj div as you can see, but how do I make it so that the div becomes greyed out/disabled, using jQuery? ...

Using BlockUI with JS hide = no go?

Hello, I am trying to use BlockUI with jQuery's hide, however, not everything's going to plan. Currently, upon script load, the said div (radiodj) hides itself. When user clicks on a button, the div shows up. Now, here's the problem. When user clicks on a link inside the div, the div hides away again, but the link action is performed, i...

What's a good JS library for making things resizable?

I'd like to make a textarea resizable. I tried out jQuery UI's "resizable" functionality, but, much as I love jQuery, the resizable thing isn't quite there yet. I want the textarea to resize heightwise only, via a handle at the bottom-center. jQuery lets you resize heightwise only, but evidently doesn't let you place a handle anywhere ot...