jquery

I can't get jQuery.post to work. Please help.

Hi, I'm trying to use jQuery.post() function to retrieve som data. But i get no ouput. I have a HTML that dispalys a table. Clicking this table should trigger a jQuery.post event. My scriptfile looks like this: jQuery(document).ready(function() { jQuery('#storeListTable tr').click(function() { var storeID = this.cells[0].inn...

How to pick out classes that start with a particular string.

This might be hard to explain, but I need a way to loop through a bunch of elements I've already selected and for each one find classes that start with the word "icon". So for example I might have the following elements <div class="button iconStar"></div> <div class="button iconPlus"></div> <div class="button iconLeft"></div> <div class...

Striped table rows in ASP.NET MVC (without using jQuery or equivalent)

When using an ASP.NET WebForms ListView control to display data in an HTML table I use the following technique in to "stripe" the table rows: <ItemTemplate> <tr class="<%# Container.DisplayIndex % 2 == 0 ? "" : "alternate" %>"> <!-- table cells in here --> </tr> </ItemTemplate> With the following CSS: tr.alternate { ...

How can I make a JQuery UI Dialog automatically grow or shrink to fit its contents?

I have a JQuery UI dialog popup that displays a form. By selecting certain options on the form new options will appear in the form causing it to grow taller. This can lead to a scenario where the main page has a scrollbar and the JQuery UI dialog has a scrollbar. This two scrollbar scenario is unsightly and confusing for the user. Ho...

Bookmarklet wait until Javascript is loaded

I've got a bookmarklet which loads jQuery and some other js libraries. How do I: Wait until the javascript library I'm using is available/loaded. If I try to use the script before it has finished loading, like using the $ function with jQuery before it's loaded, an undefined exception is thrown. Insure that the bookmarklet I load won...

Programming Challenge using jQuery

This is a follow up to a previous question which seems to have confused people so I'll purify it a bit. Here is some markup. <div class="button width120 height30 iconLeft colorRed"></div> <div class="button width180 height20 iconPlus colorBlue"></div> <div class="button width200 height10 iconStar colorGreen"></div> <div class="button wi...

How, with jQuery do I tell if a website visitor has been to the site before?

I want create a div container with a message for first time visitors to my site. Visitors will read it and click a 'Hide' button to dissapear it forever. How is this done? ...

The difference between assigning event handlers with bind() and each() in jQuery?

Hi, can someone tell me what the difference between assigning event handlers using bind(): $(function(){ $('someElement') .bind('mouseover',function(e) { $(this).css({ //change color }); }) .bind('mouseout',function(e) { $(this).css({ //return to previous state }); ...

Apply Multiple CSS classes on an HTML element (jQuery addClass)

Given this HTML: <html> <head> <style type="text/css"> tr.Class1 { background-color: Blue; } .Class2 { background-color: Red; } </style> </head> <body> <table> <tr id="tr1"> <td>Row 1</td> </tr> <tr id="tr2"> <td>Row 2</td> </tr> </table> </body> </html> Below is ...

jquery dynamically add value for Attribute Filters?

I have Attribute Filter like this one $(’input[name="email"]‘); I want to create a function with parameter, which would contain name of attribute..something like this: function test(id_new){ var var_name = $("input[name='"+id_new+"']:checked").val(); alert(var_name); } but this code is not working, any solutions? ...

Jquery menu: mouseover/mouseout moseenter/mouseleave craziness

I am trying to craft a simple menu where the first level menu entries are li elements and second level are ul blocks with their own li elements. Nothing really bright. Css contains display:none for all submenus and my (optimistic) idea was simply to show proper ul elements when mouseover is fired on first level entries then to hide them ...

Jquery tree and asp.net 2.0

I have few specific questions on how to make these two work. I need the tree that can be manipulated on the client side (add/delete nodes, expand/collapse) and that can be saved in the database when the user specifically presses a SAVE button. From the research I have done, I gather that what I need to do is use a callback (asp.net call...

JQuery UI Dialog with Asp .NET button postback..

Hello ... I have a JQuery UI Dialog working great on my Asp .NET page: jQuery(function() { jQuery("#dialog").dialog({ draggable: true, resizable: true, show: 'Transfer', hide: 'Transfer', width: 320, autoOpen: false, minHeight: 10, minwidth: 10 }); }); jQuery(document).ready(function() { jQuery("#button_id").click(function(...

Problem with javascript (jQuery). Works in firefox but not in IE

Hi! I have a problem with a site I am working on, available here. The javascript on the site works as inteded when browsed with firefox. In IE7, however, the javascript does not even get executed. As I am new to javascript I suspect that I am probably doing an obvious mistake somewhere in the code. Any help is appreciated! ...

In IE6, when I display a modal, a dropdownlist from the parent page is visible on top of the model

In IE6, when I display a modal, a dropdownlist from the parent page is visible on top of the model. i.e. the dropdownlist from the parent page is overlaying above the model popup. In firefox and IE 7 it is fine (the dropdownlist is tucked underneath the model like it is suppose to). Any ideas what it can be? ...

Extending a jQuery plugin

Has anyone extended an existing jQuery plugin? I am unsure of where to start. I would rather not actually copy and modify the plugin I wish to extend. Do I do this through prototype or just an extend call on the plugin in question? Or am I dreaming that it would make sense to do this? ...

Determine if collection of elements are visible using JQuery like $(".someClass")

Hi, I have a collection of elements on my page, and I want to see if they are visible or not currently. So: $(".someClass") How can I loop through and figure this out? because if it is visible, i have to fire another function. ...

Trouble with jQuery MaskMoney plugin and Field type Decimal (SQL SERVER table)

Hi people. I am using a ASP.NET MVC framework, jQuery library (1.3.2), linq to sql, sql server 2005. I have a problem with jQuery MaskMoney plugin, to save data in sql server table. I created a table, where this table have a field "valueProducts" type Decimal(18,2). In my page, I have a html field with jQuery maskmoney. Example: 10.00...

.net ajax and jquery tree

I need to save a jquery tree in the database. i am using .net web forms, c#. From what I hear, I need to use AJAX to collect the data on the client, package it up, and send it to the server method. WHat are the details involved? If anyone has a simple working example, please share. ...

jQuery .clone() and Microsoft Explorer (bug?)

I am having some issues with Microsoft Explorer 6/7 and the jQuery "clone" function. The jQuery that I am using is: $(function() { $('#addFields').click(function() { var newCredit = $('#original').clone(); // create new set newCredit.find('input').val(''); // empty input fields $(this).before(newCredit); // a...