jquery

To find a DOM element using jQuery and replace its string

Hi, I have a very complex DOM structure, A small for example or say demo of code, <div> <div class="test_data"> <span>sample 1</span> <span>sample 1</span> <span>sample 3</span> <span>sample 1</span> <span>sample 2</span> </div> </div> Now on above example, I have to find all the tag having sample 1 and want to r...

how to change html image src by j-query.

view.aspx <img src ="~/UserControls/Vote/Images/Arrow Up.png" id = "voteupoff" runat = "server" alt ="vote up" class="voteupImage" style="height: 45px; width: 45px"/> i wnat to change it src ~/UserControls/Vote/Images/aftervoteupArrowUp.png when click on image i means view.js $('img.voteupImage').live('clic...

jquery slide menu over canvas element

Hi, I have a canvas where there is continues animation been generated. I would like a jquery slidemenu going on top of the canvas. The issues is that the javascript of the canvas keep on writing on top of the jquery slidemenu. How to solve this? Any input would be very appreciated, many thanks. ...

Test condition for visibility check in JavaScript

Hello. I'd like to know if there's a test conditions using which one can check the visibility state(hidden or visible) of a tag. I mean a test condition,which could be used with the if() statement. thanks! ...

Bind dropdown to local (browser) database with HTML5/jQuery/ASP.NET

Hi, So I know how to store and retrieve data in a local database (Chrome). My function to retrieve data is function SelectHandler(transaction, results) { for (var i = 0; i < results.rows.length; i++) { var row = results.rows.item(i); var customer = new Object(); customer.id = row['id']; customer.fna...

Stripe ajax-table with jQuery

For normal html-tables I use $('table.alt tr:even').addClass('bg'); for striping the table. But obviously that doesn't work with ajax. the index of every new table-row is "-1" and therefore every new row gets the class. Even the Live Query-Plugin from http://brandonaaron.net can't help me. Any suggestions? Simon ...

What is the best way to encode/protect a javascript-code?

Possible Duplicate: How can I obfuscate JavaScript? Hi, i want to "protect" my javscript code. Are there any good, recommended ways which are very difficult to hack? I tested some encoder on the Web and sometimes my Javscript code doesnt work after encoding. Is this normal (cot the encoder is very bad)?... or is my code too ...

How do I load a page fragment using jQuery?

Hi Guys, I have three pages 1) index.aspx 2) schools.aspx 3) Classes.aspx All the pages has same div section in there pages. Please see below the common DIV section in all the pages, however text will be different for each page. <div id="tab-container" class="tabs-container"> <div class="contentContainer"> <img width="27...

Convert Object to JSON string

jQuery.parseJSON('{"name":"John"}') converts string representation to object but i wnat the reverse. Object is to be converted to JSON string i got a link http://www.devcurry.com/2010/03/convert-javascript-object-to-json.html but it need to have json2.js do jQuery have a native methode to do this? ...

jquery problem please help

hi, i am using jquery using div means when i select from one select box then data have been populated into the next select option but there is on big problem ie. when i hit the submit button from JSP page the action have called abc.do, and response back on the same JSP page, but this time the select option do not have a value. it flushes...

Using the jquery form plugin, how do I stop json-encoded html from being escaped

I've got a setup where I use the JQuery Form plugin to submit my forms through ajax, returning a json object from the server (running django, using simplejson.dumps). The json returned is constructed as this: status: [success/invalid/error] error: [errortext if any] html: [html-text to be inserted] My problem is that when entering the ...

Jquery Custom Validate Plugin AddMethod on Dynamic Forms

Hi All, I am trying to use the Jquery Validate Plugin and I was able to figure out how to use it on static fields. My problem is on how to used it on my dynamic forms. I created a fiddle to discuss my problem. Hope you can have patience on reading this. The fiddle link is here Now, here's what I want to do, validate the Machine ID...

Jquery - If cursor position at the start/end in a textfield

Hi, i have a textarea and I want to check if the cursor is at the start or at the end (I dont need the current position). Did anybody know a simple jQuery solution? Thanks in advance! Peter ...

JqGrid bug, buttons are shown twice

When I load jqgrid first time everything is ok. When I reload it, buttons are show twice. How to fix it? Is it a common problem with jqGrid? I can't post screen to show it :-( ...

How to select an element by its attribute when value is an array

Hi, In HTML: <select name=site[new][fw][version]></select> In jQuery, I've tried: var fwvs=$('select[name=site\\[new]\\[fw]\\[version]]') But fwvs.length return 0. What am I doing wrong? Thanks ...

jquery div fadeout on child form event

Hi. I'm new in jquery/javascript and couldn't google for any solution. I have number of divs generated automatically from cycle. Each of them contains form as a child element. So on form submit I'd like the corresponding parent div to fadeout. I am using Ajax for form submission. Basically, now I have an event handler 'submit' binded...

Asynchronous AJAX query with jQuery

Hello, how can I do the following by means of jQuery? var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState ==...

JavaScript function that can produce same results as PHP function number_format

I'm in search of a JavaScript function that can produce the same results as the PHP function number_format(150000,0,',',','); is there a JavaScript function available to do this? ...

Preffered calender for ASP.NET

Hey, I search a good calender for my business application. The Microsoft ASP.NET calender is perfect for my requirement, but I heard that this component is not longer supported by Microsoft. My apprehension is that I must in the near future program a new one. Should I use a jQuery calender ? Can I use a future-proof library ? Thank you ...

How to select next 2 (or more than 2) items using jQuery .next()?

using jQuery's .next function I want to show next 2 items. By default it selects only just next item. I need control, like sometimes I need next 2, sometime next 3 ...