jquery

Convert css width string to regular number

While trying to compute the width of an hidden element I found that jquery.width() returns 0 for that elements' width. I found out that using jquery.css('width') would return the correct width by using the declared style width (even if that value is different from the initial stylesheet). The problem is that the css('width') method re...

JQGrid Redrawing is slow

Hey Everybody! So i've had JQGrid in my application for a while now and the speed of the grid hasnt really bothered me up until I started optimization. If find that even if I have a small grid (20 items per page) the hover highlighting is slow and if the grid happens to need a scroll bar on the page, the scrolling of the page is really...

How can I get Colorbox to appear in a div?

At the moment I've got Colorbox setup so that it starts automatically when the page loads, but I need to place it in a div on the page, instead of hovering in the center of the page. How can I do this? Thanks for reading. ...

Query objects with an array (without 3rd party script)

How can you query an object with an array? var myArray = ['A','C'] Using myArray, how can I get a returned array with ['1','3'] out of the following (previously JSON object) (without using a third party query script -- unless it's jQuery :) [ { "property1": "1", "property2": "A" }, { "property1": "2", "property2": "B...

Whats the best charts jQuery plugin to use on my App?

Hi all, i'm making an application based on jQuery and i need the best charts plugin to show the information to the client. My app is litteraly like Google AdWords and Google AdSense. I need to show to the costumers the clicks and views per ad or banner on the last month or week, show the amount of credits to them and interact with our ot...

Extracting jpeg EXIF information using jQuery

I'm trying to extract EXIF information from images using jQuery. I've tried using a script I found here but I can't get it to read exif data from externally hosted image files. I've posted a simple example page here. The code is tiny so you can just view-source to see what I tried. Does anyone know either what I'm doing wrong or if the...

Can we create any general HTML Component ?

I have an HTML page. I have created a frame using background repeat function. It is like a dialog box as below : The HTML Code for this is : <html> <head> <title> Frame </title> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript" src="frame.js"></script> <link rel="stylesheet" href="frame...

Handling of Japanese with Jquery.serialize();

Hoo boy. A weird one I guess! getting input from a form, I want to make sure there are no western characters, punctuation or numbers before sending it to a php script for creating some xml... from form name = "a" $('form').submit(function() { text = ($(this).serialize()); text = text.substr(2,text.length) text = text.replace(/[^\u3...

JQuery cookie extension will set a cookie with a path but will not read it

First, set a cookie: jQuery.cookie('monster', 'big', { path : '/sesame/'}); Next, try to read it: jQuery.cookie('monster'); Firefox tells me that the cookie has indeed been set. The value is big and the path is /sesame/. And yet when I tried to read the cookie it wouldn't work. Alternate version of the question: How do I specify t...

Jquery Form Submit

Hi all, I am working with jQuery and after looking over other questions, I cannot seem to find an answer to the problem I have. I am trying to validate a form and submit it in one action. It work's fine it I use a submit button, but it I try and call the trigger from another function it fails. jQuery code: $(document).ready(function()...

jquery - iterate over checkboxes and determine if checked

I want to iterate over checkboxes div and determine if checkbox1,checkbox2,checkbox3 are checked // iterate over checkboxes $('#register_students').click(function() { $("div.checkboxes").each(function() { var student = $(this).attr('data'); var checkbox1 = ??? ...

Using JQuery UI to convert radio buttons into slider elements.

I have a form which is rendered with radio buttons like so: <h2>How long is your hair?</h2> <input type="radio" name="71" value="98">Short <input type="radio" name="71" value="99">Medium <input type="radio" name="71" value="100">Long There are about 15 questions like this, and I would like to have the whole form rendered with slid...

jquery 'regex' toggle

I have an id of the form id = MAIN. When a button is clicked, I want ALL other id's in the dom of the form (MAIN_*) where * is any string to be toggled, so: $(something).toggle(); // will toggle all id's MAIN_* How would I do this in the click event of my button? ...

Fixed text at end of textarea

Hello, Is there any way to get a fixed, default text on the end of the text in a textarea? Why? I have a textarea to make twitter stsatuses, and at the end, every user have to have their signature. So I want to have it in the text, that they can't delete. Any code or plugin to do that? ...

Can we recognise '%' & 'px' in jQuery ?

When reading width of DIV section, the result comes in %. But, I want to convert it in pixel value. How is it possible ? I have a class "h" defined in my html. It has width="100%". It's parent div has width="69%". width = ($(this).find('.h').width()) So actually the width is not window.width() but it is 69% of it. I want it in pixel ...

javascript context menu click event/detection - filter paste content

Scenario: I'm trying to intercept paste events inside a textarea/input text, and filter the content being pasted. Webkit/IE are handled rather well, as I can attach code to the onpaste event, and then read from the clipboard what is being pasted. Plenty of examples around. Gecko is trickier, because as far as I know it isn't possible t...

jquery capturing text of selected id

If I have id's of the form: t_* where * could be any text, how do I capture the click event of these id's and be able to store the value of * into a variable for my use? ...

Jquery Validations when using Zend Framework

I am Using zend Framework-1.7.2. when I am Updating Account Information of logged in user that time I am using jquery validations. But the script is not working. How to use it? Please, anyone can help me ? I am not using Zend Jquery Plugin. I am using seperate Jquery script like we are including and using in any simple php project. ...

Why does all browsers do not set all output perfectely ?!!?

This is an html page : <html> <head> <title> Frame Set </title> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <!--<script type="text/javascript" src="frame.js"></script>--> <link rel="stylesheet" href="frame.css" type="text/css" media="screen" /> <script language="JavaScript" type="text/javascript"> $(document).rea...

radio button default checked problem using jquery datatable aoColumns in chrome and Firefox

I am using jquery datatable in my asp.net mvc (C#) application Radio button is not selected by default when using aoColumns of jquery datatable in google chrome and Firefox. Html: <td> <%=Html.RadioButton("Password" + item.PasswordRequestId, RequestStatus.GRANT, true, new { @id = "RequestGt" + +item.PasswordRequestId })%> </td>...