jquery

Accessing objects using index in jquery

How can I access Objects when there are multiple objects are returned when using selectors? $('.copy_anim')[i].css({ 'position' : 'relative', 'right' : '-30px', 'opacity' : '0' }); using the above code says $('.copy_anim')[i].css is not a function. ...

how can i change the View Data data from j query and assign it to control ?

Hi I am getting data in ViewData on my view in my asp.net MVC application. I want to change the value of control dynamically. so I have write the Jquery for this. But How to get data from ViewData and and update it dynamically? how can i change the View Data data from j query and assign it to control ? ...

jquery animate is not working in IE 7

This is my code and it's working in Firefox , Safari and Chrome. However, can't work in IE 7. How to fix it ? jQuery(".jqbox_innerhtml").animate({ "width":"400px", "height":"200px", "margin-top":"300px", "margin-left":"200px", "opacity":1, }, 1000,function(){ ...

jQuery call followed by clicking accordion control fires Ms Jscript error

Hi. I have jquery modal that works perfectly fine. But after closing this modal and clicking on accordion control(MS ajax) fires Jscript runtime error Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.AccordionSelectedIndexChangeEventArgs' cannot be converted to type 'Sys.Ca...

How to make custom script into Jquery like plugin

I have writtern a script to limit the number of characters in the textarea, and the code is here <script> function limitchar(charcount, counterId, msgId) { var tex = document.getElementById(msgId).value; var len = tex.length; if(len > charcount) { alert("Content Limit Exceeded"); tex ...

Generate an image an show it in a html page without write it on the disk

In a my project in Ruby On Rails (but this is not important), when I load a html page, I need to decrypt an image (jpg) and show it in the web page: after the page request, the image is decrypted an the file is write on the server disk, so the browser can show the image. I don't want to write the image on the server, but I want to encry...

slideToggle executing twice in one call

I can't show a live example at this point, but i don't see how the slideToggle is being called twice. it is called on click of a link. here: // initialize the jquery code $(function(){ $('div.slideToggle a').click(function(){ $(this).parent().siblings('div.remaining-comments').slideToggle('slow',function(){ //'this' becomes the r...

Change auto-load on scroll logic (prevent user from waiting)

Hi, Currently, I use the following logic to auto-load new posts from the database when the user reaches the bottom of the site: $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { last_msg_funtion(); } }); Fair enough. It does what it's supposed to do, but I'd like to change thi...

jqVideoBox problem in Explorer?

Hello, I want to show a video in my site and I decided to use the jqVideoBox plugin. Everything works ok. The only problem I have is that in Internet Explorer 8, the actual video change its size and thus the padding I am using is not working for the right size. It is like being cut on the right site. Is anyone know how to solve this pro...

jQuery Image Click Help

I'm like 2 hours new to jQuery. I have a list that has usernames and an image next to each username. If they click on the the image next to the username that username will get deleted. Example: <table> <tr><td>MARK</td><td><img src=delete.jpg id=MARK></td></tr> <tr><td>DAVE</td><td><img src=delete.jpg id=DAVE></td></tr> </table> Th...

Need jQuery plugin to implement this UI

Hi, Does anyone know of a jQuery plugin to implement this UI? Unfortunately I'm not able to find anything like that on Google. You can write a script on JQuery, but I would not want to waste time reinventing the wheel. ...

how to submit form with enctype multipart/form-data in jquery

hi expert, i'm using form with enctype multipart/form-data for uploading photo, so below is my code for normal form submit, $.ajax({ type: "POST", url: loadUrl, cache: false, success: function(html){ $(outputLocation).html(html); } }); how this should alter, so its applicable for multipart/for...

Does Parent window (The first page of my site) gets focus when closing childs till i return to it?

Hello all, In my system i have a main page, what when clicking on any element on that page a new page is being open, in some cases (button click on child page) from the child page will be open a new page, and so on...when i deside to close any child i need to close all levels to the top and refresh the top level page becouse on the child...

IE 6 JQuery toggle class bug! Help!

While developing a new site I stop periodically and test all new functionality in IE6. It's a pain but we can't drop support yet. I have hit a problem with JQuerys toogleClass function. I have a css styled <button> that toggles between a plus and a minus image when clicked. This works on all browsers expect IE6. $('#searchForm #togg...

Adding two floats and assigning the total to a input field

Hi guys, as the title states, I am trying to add two floats using javascript/jquery, and then assign the value to another input field, but sometimes when I add the two I get something like 1234.567800000000, any idea on how I can fix this? EDIT: I would like something like this, 1234.56 here is my code, jQuery: $("[data-custom*='mi...

WCF Ajax Service Returns Blank to jQuery's Requests

I have an ASP.NET Ajax service set up using WebSriptServiceHostFactory in the *.svc file - no web.config configuration. In the contract, I'm starting with two very simple methods: [OperationContract()] [WebGet] string GetPersonalInformationLabel(); [OperationContract()] [WebGet] string GetCorporateInformationLa...

Parsing XML with Jquery

Hi I am new to Jquery and struggling with parsing XML. I have a search box in my form that returns the results of a sql search when the user has entered the first few letters . this string is then searched with a php file and the results are returned in the form of an xml file. The problem is that I need to uniquely identify each name a...

Problem attaching xVal validator

I'm rendering the following input: <td class="field <%= BookingExternalResource.Metadata.Value.CssClass %>"><%= Html.TextBox(string.Format("BookingExternalResource[{0}].Value", i), row.Value, new { style = "width: 60px;" })%></td> So I've tried attaching a xVal validator like this: <script type="text/javascript"> xVal.AttachValid...

jQuery keyboard navigation breaks on Firefox

The following code reveals a div on a keypress event of '?' (191). Works perfectly with Google Chrome but refuses to work with Firefox. Any ideas? $(document).keyup(function (e) { if(e.which == 16) isShift=false; }).keydown(function (e) { if(e.which == 16) isShift=true; if(e.which == 191 && isShift == true) { if ($('#keyboar...

How to build an HTML5 game

Hi. I'm tasked with building an educational game for 6 - 10 year-old children using HTML5 for a non-profit organization. I've used HTML5/CSS3/jQuery to build a new site but have no experience building games. This project will have to be completed in about 2 months. A few questions for the experts here: Is this doable in 2 months? Do I...