I have this functions
//send JSON-RPC request
var json_rpc = (function() {
var id = 1;
return function(url, method, params, success) {
if (typeOf(params) != 'array') {
params = [params];
}
var request = JSON.stringify({
'jsonrpc': '2.0',
'method':...
What would be the easiest way to transform
$('#my_element').css('backgroundColor')
to object like this:
{ r: red_value, g: green_value, b: blue_value, a: alpha_value }
?
...
I've created DIV.cb-toggle, when the user hovers over this div, it animates to Orange, when they hover off of this div, it animates back to gray, when the user clicks this div, it animates to blue, telling the user that it's been selected. So when it's NOT selected, it has mouseenter mouseleave animations, but when it's selected i want ...
Is there a way to send multiple addresses to plot from an URL?
example for a single address to plot
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=H9R1H3+57%20EASTVIEW%20AVENUE
...
Hi,
I am not able to make my jgrid text box draggable. How can I make it draggable?
Please help.
Here is my code.
jQuery(document).ready( function() {
//debugger;
var lastsel3;
jQuery("#test").jqGrid({
url:'/Content/xml/user.xml',
//url: $!retrivexml,
datatype: "xml",
colNames:['Consultant','Project R...
How can I submit a specific form using the follow code (example the id of my form is #form1).
$(".nextbutton").click(function() { submit; });
...
I would like to toggle my table row on an .change function in jquery. The desired row is being displayed in this code, how do I hide the other rows at the same time?
$(document).ready(function() {
$('#ddlSelect').change(function() {
var ddlId = $('#ddlSelect').val();
alert(ddlId);
//$('#displayTable').hide...
I'm having trouble with some jQuery stuff, please help me out. Below is my form structure:
<form name="imageUploadForm" id="imageUploadForm" action="" method="POST" enctype="multipart/form-data" >
<table border="0" width="80%" cellpadding="2" cellspacing="3" id="mainTable">
<tbody>
<tr>
<td>
<tab...
Hi there.
I have a table set out like:
<table id="myTable">
<thead>
<tr>
<td><input type="checkbox" id="selectall" /></td>
<td>Column 1</td>
<td>Column 2</td>
<td>Column 3</td>
<td>Column 4</td>
<td>Column 5</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
Then, the javascript:
var my...
I have a dropdown menu and I want to disable/enable a button on my page when a certain value is selected. It works in All browsers but IE7 and below. Work around????
Code:
<script type="text/javascript">
$(document).ready(function() {
//Start Buttons
$(".nextbutton").button({ disabled: true });
(".nextbutton").click(fu...
I am using jquery as so
$('.mybutton').live('click', function(){
// do something
});
this is called when the document is ready but when the document is ready there are 'mybutton' classes being used, but if the user clicks somewhere a new form appears which uses the button with the class 'mybutton'. But this does not seem to be wor...
How can I access the key of a non-associate array? Here's my scenario, I have an array of objects (in this case, they are coordinates):
coords[0] = {x: 37.543524, y: -56.65474}
coords[1] = {x: 35.041292, y: -76.03135}
//etc..
I'm using a jQuery templating plugin to print out the results:
$('#repeater').tmpl(coords).appendTo('body')...
jQuery show method behaves strange in Chrome for me. I have a page with openid-selector plugin (http://beaware.at/account/logon). Sometimes open-id selector is shown, but sometimes - not. It reproduces well if you refresh the page several times. In the cases it is not shown, there is no style="display: block" at "openid_choice" div, so I...
Hey Guys (and Ladies)
I want to select an image (with jQuery) by the src attribute. The Image is inside an ul and a collection of div's. The id of the ul is "sortable".
Here is my HTML:
<ul id="sortable">
<li id="pic_0">
<div class="sortEleWrapper">
<div class="imgWrapper">
<img src="/test1.jpg">
</div>
...
Hi,
I have a method in a class and into this method i have a handler for a click event in a div element:
function MyClass(container)
{
this.Container=container;
this.PrepareHandlers = function()
{
$('#Div1').click(function() {
alert(this.Container);
});
};
}
But since im into the handler, ...
hello there - trying to post some data built from some none form elements but can't seem to crack it.
how can i create a an array in the same format as serializeArray() does with form fields?
tried several variations on this but it only picks up the last .active tag?
any help appreciated!
$('li.tag.active').each(function() {
...
I'm struggling to figure out how to re-index (?) a series of hidden fields with jQuery/Javascript. The sample code below is generated each time a user clicks a create button. The numerical value applied to the hidden fields within tier[] is the index of an option selected from a drop-down.
The problem I have is every block of code (exce...
Hi folks,
I have a query and I just want to know if its possible to do or not. If yes, then it would be real helpful if you can guide me to a sample or an example.
So what I am trying to do is, do a comparison on HTML (or DOM elements). So lets take this scenario:
I have 5 rows on my page (5 <tr>'s or 5 <div>'s), and I make an ajax ca...
Could someone explain what's wrong with this snippet?
I'm looking to get the width of all images in a div.
var totalwidth = $("#imagecontainer > img").width();
$("#imagecontainer").width(totalwidth);
sorry, thought it was just a syntax problem
(un)working example here:
http://jsfiddle.net/TZ2nT/3/
the container div does not accept th...
Isn't this sort of a thumb-rule? Shouldn't this be served from a cookie-less domain?
Serve the following static resources from a domain that doesn't set cookies:
* http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
Anyone know any alternative URL that Google would use to by-pass the Cookies?
Edit: To anyone seeing...