jquery

letters or numbers only in a password with jquery

Hi, I found this code for alphanumeric check ("Letters, numbers, spaces or underscores") but I want to change so I will be able to write only letters or numbers. Can anyone tell me how to change this code: function(value, element) { return this.optional(element) || /^\w+$/i.test(value);} Thanks! Greg ...

jquery ui autocomplete with database

I fairly new to JQuery and perhaps trying to achieve something that might be abit harder for a beginner. However I am trying to create an autocomplete that sends the current value to a PHP script and then returns the necessary values. Here is my Javascript code $("#login_name").autocomplete({ source: function(request, response) { ...

using closest().find().text()

Hi guys i previously asked a question and got a good solution. here is the question: http://stackoverflow.com/questions/2536892/jquery-how-to-find-an-element-which-is-comming-2-elements-before-current-element when im using the solution which i got : paragrafheading.push($(this).closest('> h3').find('> h3').text()); im getting only [...

Started with jquery 1.4, should I care about previous versions?

I have a fair knowledge about Javascript, I started with jQuery 1.4 a week back and I have gone through some examples. It's very interesting to use it with my application. But my concern is, should I care about previous versions? Should I know what the downsides are of the previous version? ...

Jquery Plugin Help

I'm using this plugin: http://www.jeremymartin.name/projects.php?project=kwicks And my code follows this example: http://www.jeremymartin.name/examples/kwicks.php?example=7 I'm using the configuration setting of: sticky: true, The plugin sets the first element in the list to be active and expands to display the content that hidden f...

Watermark asp:Login control Username and Password fields

Hi all, I'm trying to watermark the asp:Login controls' Username and Password fields with jQuery, I've tried various ways of referencing the control ID: $('#<%=ClientID.Login1_UserName %>').watermark('watermark', 'Username'); I have tried moving the ClientID, Login1 and UserName around and changing the selectors to and from userscore...

jquery toggle+paginate+multiple instances

Hi, I'm a jquery newbie - wanted to ask what might be the best strategy for achieving what I am after as I think it uses a mix of jquery functions : If list of items exceeds 5 items a 'more' link appears which when toggled will reveal the rest of the items. If items list is 5 or less no 'more' link is shown. Hide button also at bottom...

JQuery tablesorter Ajax sorting

Hello. I am showing the database table using tableSorter jquery plugin. I have large number of records so I have to paginate. If there is only one page of data, I can allow tablesorter to do client sorting, however, when I have more pages I need to specify sorting order using ORDER BY sql statement so that all pages are affected. I tri...

jQuery Toggle Help

I have the following code: $(document).ready(function() { // Manage sidebar category display jQuery("#categories > ul > li.cat-item").each(function(){ var item; if ( jQuery(this).has("ul").length ) { item = jQuery("<span class='plus'>+</span>").click(function(e){ jQuery(this) .text( jQuery(this)....

Null date reference when passing json to MVC Controller

I am building an event system that posts data to a google calendar. I am using jquery 1.4.2, fullcalendar 1.4.5, and asp.net MVC 2. I am using a jquery ui modal dialog for the entry system. Jquery ui datepicker for the from and to fields. Select boxes for the time fields. I have tried both string and DateTime formats in the GCalEvent Cl...

Strange recursive infinite loop I cannot track down

Hey there, I've got a prototype having a method I can add callbacks with: /* * Add a callback function that is invoked on every element submitted and must return a data object. * May be used as well for transmitting static data. * * The callback function is supposed to expect a jQuery element as single parameter * and must retur...

Jquery Close menu div on a click event

I have a div which opens when I click a menu button, I am trying to close it if the user clicks anywhere after it is open. The issue I am having is that with my code the show div and the close div when a user clicks I guess are firing at the same time for some reason. The code for the click event is below. How can I make it so they do no...

jquery hide form when selecting login submit button, not just any button

I have a form, if submitted correctly, it hides the form. I added a cancel button, to close the pop-up thickbox window, but when I hit cancel, it hides the form. How do I go about hiding the form if the login button is selected? $(document).ready(function() { $("#login_form").submit(function() { var unameval = $("#username...

JQuery IE Object doesn't support this property or method.

I've been trying to debug this the whole day but can't seem to find why it's not working on IE7+. It's working fine on other browsers except IE7+ Here's the JS code: $(document).ready(function(){ $('#bigbox_carousel').rotator({ width: 490, height: 210, duration: 'slow', rotate: 5000, selected: 0 }); $('#bigbo...

getting parts of url window.location

Can someone help me with url hash? I use this code to get the current url and then send the data as json, but the hash part seems to be stripped then. i tryed to use href and hash and i always get the default.aspx but no hash part like #anchor. var location = String(window.location); var title = String(document.title); var text = { '...

jQuery: correct syntax for ':not()'

I'm trying to filter a list of elements via ':not()', and jQuery seems to be ignoring my filter. here is the code: myElements.filter(':not(.someclass)'); jquery still selects all of myElements... ...

"G is undefined" when using javascript object

Hi, I'm using a javascript object to populate a dropdown based on a previous input. My object looks like the following: var cars = { 'A.C.' : ["16","16/80","16/90","2 Litre","2-1","3 Litre","428","Ace","Aceba","Cobra","Greyhound","Me","Shelby"], 'Alfa Romeo' : ["145","146"] } Its bigger than that but you get the ji...

Animate Jquery addClass on hover

I'm new to Jquery so unsure how i would go about editing the code below to create a fade in when the class element is hovered over. <script type="text/javascript"> <!--//--><![CDATA[//><!-- $(function() { $('div.work-item').hover(function() { }).hover(function() { $(this).addClass("hover"); }, function(){ $(this).remove...

jQuery if and logic

I have a simple jQuery toolbar, the basic functionality is: Hover: Background change to defined value & add .active class OnClick: Move the icon down 4px, and change background of the toolbar to that of the element What I would like to do move the icon down 4px when it has the class 'active' applied, however also remove the onclick e...

jquery tablesorter and tablesorter Filter plugin...can it sort and filter unordered lists somehow?

I'm using the tablesorter and the tablesorterFilter plugin, and for that matter the tablesorterPager plugin to sort my data. I have a navigation menu that I use to organize content into a folder type layout, similar to how windows explorer folder tree view works. I'm using an unordered list to display the menu. Is it possible, or is t...