jquery

How to prevent HTML form reset

I have a form where everything is supposed to be disabled on load except the first field. The first field is an autocomplete input. When they select something from it, it goes disabled, and then sets the second field to be enabled. The second field is a dropdown. The problem is, after a user uses the form and clicks the back button, i...

How can I hide a ul inside li?

Please tell me how can I hide ul child element inside each li, by clicking li link. I mean if someone clicks Alink, A1 and A2 hides. This is my HTML code : [Code missing] And here is the jQuery code, but it doesn't work :( $(document).ready(function() { $("#ListGrayCircle li").click(function() { $(this).find('ul').hide(); ...

Jquery Auto Complete in asp.net

hi. i want to use jquery ui auto complete plugin in asp.net. this is my behind code : Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim locations As String() = New String() {"Las Vegas", "Los Angeles", "Tampa", "New York", "s", "sss"} Dim jsArray As String = GetJSArrayForVBArray(lo...

Stop the onclick if MouseUp

Hi, is it possible to deaktivate the onclick Function? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Unt...

JQuery $.post not working on some PCs

Hi guys, I have a very strange problem with JQuery $.post() I have implemented it in my new web application and get messed response from QA after testing, some say it is working perfectly and some say it is not working; It generate no error and no warning,,, but i am very upset i have almost compeleted the application and it is impossibl...

How to pass values of form input fields to a script using AJAX/jQuery ?

My current code is like this. index.php <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript" src="ajax.js"></script> <select id="dropdown_id"> <option value="one.php">One</option> <option value="two.php">Two</option> </select> <div id="workspace">workspace</div> one.php $arr = array ( "wor...

Superfish Menu Hovering

Hi, Hoping someone can point me in the right direction with regards to Superfish jQuery Menu Plugin at Superfish Site My question is, I am using this menu system inside Oracle Application Express (ApEx) and using IE6 browser. What I find and not sure if this is specifically relevant to Oracle ApEx but when I hover over a menu item, I ...

Adjusting <ul>'s width to accommodate menu items using jQuery

This is an expansion of a question I posted a while ago: http://stackoverflow.com/questions/3275997/fitting-a-uls-width-to-accommodate-the-menu-items Is there a snippet of jQuery code that can adjust the width of every <ul> inside a certain <ul> to make sure the <li> items don't overflow? The menu looks something like this: <ul id="men...

How do I create the Jquery goldfrapp changing background images

Hi Jquery experts I'm trying to create a rotating background like the clouds on Goldfrapps site. I've searched on google for changing background animation jquery but these don't have the same effect I want. Thanks for all your help Thanks Judith ...

Attaching OnMouseOver event for all the URLs in a page

Hello I want to attach OnMouseOver even for all the anchor tags in a page. But i if any of the anchor tags already has a OnMouseOver even i dont want to replace it. I just want to add my event handler there. How can i achieve it through Javascript or JQuery? ...

How can i pass parameters to a JQuery $.getJSON callback method?

Hi folks, I'm trying to use JQuery to call some custom api via Ajax/$.getJSON . I'm trying to pass a custom value into the Ajax callback method, but that value is not getting passed through and is actually getting overwritten. This is my code:- var locationType = 3; var url = 'blah blah blah' + '&locationType=' + locationType; $("#load...

jQuery: width() not working

hi all, here's my simple code: var msgbox = $("<div style='width:320px;height:200px;'></div>"); alert(msgbox.width()); the alert gives me zero - what's wrong? why isn't it 320? thx ...

$(document).ready() source

I need to wait for document readyness in my JavaScript, to insert a div at the bottom of the body. I want to: make this JavaScript file as small as possible (compile it down to < 1kb if possible) inline the code that provides the document readyness in a closure (without exporting it) Inlining the whole jQuery source in my file would...

Changing link class based on dates

I have got a list of menus up on our website with the current week's menu highlighted with a different colour background which is decided by a class of 'current' on that item. At the moment I change this class manually each week but was wondering if there is something I can set that changes the class automatically based on dates that I g...

How to make a SVG box created by Raphaeljs transparent to mouse events

I'd like to create a SVG overlay over my webpage using "z-index:1000" and make this overlay transparent to mouse events. However right now if I create a SVG object at absolute position using i.e. this call: r = Raphael(0,0,150,150); r.path("M0 0L150 150").attr('cursor','crosshair'); $(r.canvas).css({'z-index':1000, 'position':'absolute...

jQuery/AJAX Formatting layout - My Tiny Todolist

Hi Guys, I'm trying to modify http://www.mytinytodo.net/ to integrate it into an app I'm developing. Unfortunately my jQuery/AJAX ability is rubbish at best. I want to do two things: 1) Tasks to be placed into a parent div depending on due date class. For example, tasks that have already gone past their duedate are placed inside 'e...

Problem with loading data from Java Struts2 Action into jqGrid using Java Struts2 jQuery Plugin

Hi I'm using Java at the core backend and JSP pages as GUI frontend. and also I'm using Struts2 to connect JSP Pages to my Java Core. struts2 jQuery plugin provides jquery capabilities as struts tags. see the showcase here: now I wanna load 2 very simple 1 columned rows into the grid provided by jQuery Plugin. I've got just this tag in...

Select an exact element and not its children

I have a menu like this; <ul> <li><a>1</a></li> <li><a>2</a> <ul> <li><a>3</a></li> <li><a>4</a></li> <li><a>5</a></li> <li><a>6</a> <ul> <li><a>7</a></li> <li><a>8</a></li> <li><a>9</a></li> </ul> </li> </ul> <li><a>10</li> </ul> If i want to make an selection on the 2nd level with jQue...

extend jquery plugin object with functions

so im trying to write a new jquery plugin. base (this is not my plugin, just for better understanding): (function($) { $.fn.mySuperCoolPlugin = function(options) { // Build main options before element iteration var opts = $.extend({}, $.fn.mySuperCoolPlugin.defaults, options); var editText= 'pre ' + opts....

Get input text value on jQuery keypress event

Hi, I'm trying to get a input text value on jQuery .keypress() function, I've saw various examples with keypress and keydown but not dedicated on getting the input value. Is it possible? $(document).ready(function(){ $("#my_field").keydown (function (e) { alert (e); }); }); The returned object has a series of propertie...