jquery

jquery show and hide problem

I have a set of records with an "edit" button next to them. I also have a div that has a form inside of it. when I click on "edit" I show the div. Inside the div, I have a "close" button which simply closes the div via jquery.hide(). when I then click the "edit" button for another record, the div does not get displayed at all. I use o...

csv2table + pagination

I'm using this jQuery plugin to turn a CSV file into a table. I then want to paginate the results. I know I should probably do it server side but I'm curious to see if its possible client side. <script type="text/javascript"> $(document).ready(function(){ $('#view1').csv2table('Book1.csv'); $('table').each(function() { var curren...

[jquery] parts of page loaded with ajax dont work with functions

Hello, I have a table like this <tr> <td>No.</td> <td>Username</td> <td>Password</td> <td>Usage Left</td> <td>%</td> <td>Valid Until</td> <td>Days Left</td> <td>Delete</td> </tr><!-- This is table head and is contained in multiple rows --> I add/delete users with jquery but when i add a user instead of reloading the page ...

DHTML newbie question

Hi Guys, I have just started learning Javascript and I am absolutely overwhelmed with the number of technologies available especially on the browser side. Earlier I thought that just Javascript should suffice but now it appears that I need to understand JQuery, GWT, YUI and another dozen acronyms I do not even know the expansion for. Ca...

send a jquery callback function inside a variable

I have this jquery function function example(file, targetwidget, callback){ $(targetwidget).load(file, {limit: 25}, function(){ $("#widget_accordion").accordion({fillSpace: true}); }); } it's working ok when I do: example('http://example.com/', "#divid", callback); but I want to send the callback function insi...

Browser detection Plugin?

Hi I have a website that I made and I am planning to redo it. The current version of the site used a jquery callout plugin that did not fully work in IE6. This got me thinking about browser detection. At first I was just going to put the supported browsers on the home page but then today on Digg I saw some post about some jquery plugin...

convert jquery greybox into favelet

Hi anyone can help me with converting this into a bookmarklet to load an external site in a iframe inside an overlay like how it is done on http://jquery.com/demo/grey/ thnx ...

jQuery.ajax - force cache invalidation

I am using jQuery.ajax (http://docs.jquery.com/Ajax/jQuery.ajax) to inject the contents of a different web page into the current page. Think of this as a "preview" window. jQuery has an optional cache argument which works great at loading the contents from the cache instead of requesting the same page again. My problem is that the c...

jQuery Date Picker: Select Weeks at a Time

I know that there are lots of jQuery date pickers available and I have looked through a number. Essentially, I need a date picker that allows the user to select only entire weeks at a time. The user is picking room reservations, which last for a week. Therefore, I want the date picker to show such explicitly. Before I modified a date...

JQuery click function not firing intermittently

Wow, this one has me tearing my hair out. I'm tracking links in JQuery. $(".hdr a[id]").mousedown(function(e){ var h = this; var url = "/g/click/" + this.id; $.get(url); }); It appears that sometimes the browser beats the ajax call. The new page is loaded before the click tracker is fired. (It's not slow response time;...

How to unit test jQuery keyboard events?

Is there a way to test JavaScript keyboard event handlers (for keypress, keyup, keydown events)? I know I can declare event handlers like this: function keyUpEvHandler(e) { ... // code here } $('#myId').keyup(keyUpEvHandler); and then just run this function in unit tests, but I will have to prepare event argument object to be th...

How to call split(token) on a string that does not contain the token without causing an error?

I have two types of strings as the IDs of elements in my HTML markup: Dates: "april-23" "march-20" and season names: "springtime" "winter" The dates have a dash separating the month and the day. The seasons are a single word with no other tokens. I want to assign the month or the season to a new variable called: time_of_year ...

Jquery selector length restriction?

I am using ASP.Net MVC which has created an id for a textbox for an object which is deep within my object tree as follows: <input id="evt_SessionLinks[0]_Sessions[0]_TimeTables[0]_TimeWindows[0]_Finish" name="evt.SessionLinks[0].Sessions[0].TimeTables[0].TimeWindows[0].Finish" type="text" value="" class="clockPick"/> I am trying to s...

How to change element style back to normal if clicked somewhere else?

Hello, I have a table like this <tr> <td>No.</td> <td>Username</td> <td>Password</td> <td>Valid Until</td> <td>Delete</td> <td>Edit</td> </tr> <tr> <td>1</td> <td id="1"> <div class="1u" style="display: none;">Username</div> <input type="text" class="inputTxt" value="Username" style="display: block;"...

CSS Overflow Side Effect Involving Rad Editor and jQuery .animate

I have the following items in a web page: an instance of the Editor from Telerik's RadControls for ASP.NET AJAX: call it "Editor" a div that can change position by means of jQuery's .animate function: call it "divAnimate" a div with a css overflow setting inside divAnimate: call it "divOverflow" When divAnimate moves, the part of Edi...

Using numbers for names of javascript object elements

Is the following code valid? var i; var objs={}; for (i=0; i <10; i++) { objs.i=new FooObject(); } alert(objs.4.someMethod()); If not, how should it be rewritten to accomplish what I want? ...

jQuery version compatibility problem with accordion menu.

Im testing this accordion: It cames with an old version of jQuery. Works fine, but when a try to upgrade to a newer version of jQuery wich I need for other functionality it stops working. What Can I do? ...

deserialise json server side

How can I de-serialize a json object sent from javascript (using jquery.ajax) to a .aspx page (not a web service)? e.g. if I have the following json object; var json = {"name" : "michael", "surname" : "brown", "age" : "35"} and I use $.post('process.aspx', json) how do I get to deserialize the json in process.aspx code behind? al...

i need to send through the GET method data using the thickbox library and jquery

cause i got some 403 errors ... that's beacuse my server doesn't has enabled the directory listing anybody has done something like that ? thanks. ...

jquery click with a loop?

I am trying to put a click function on a php loop. But its doing part or all of the function on all the links.. I thought if used "this" it would solve it but it's not working.. Here is the jquery: if ($('#like').hasClass('notlike')); { $('.likeon').click(function () { $('#like span.message', this).text('Yes I Like It'...