jquery

jquery tabs are being displayed as vertical list in an accordion in IE6 but works fine in FF and IE 7. Any solution?

I am using jquery tabs within a jquery accordion. It works and displays fine IE7 and firefox but not in IE6. The tabs are appearing as vertical lists. The tabs do work. ...

jqGrid inline edit problem

I wanna use jqGrid inline(row) edit, but how can I put "Edit", "Cancel", "Save"and "Delete" buttons besides every row. There's a example in officaill website about how to put "Edit", "Cancel" and "Save" buttons for inline(row) edit, I tried to put delete button, but it doesn't work. How can I do it? thx ...

Empty Flot Charts?

I'm running the code below and getting an empty chart using Flot/jQuery. Ideally what I am after is a bar chart of the data. I'm looked and looked at this with no joy - does anyone have any ideas? <div id="user_breakdown_placeholder" style="width:300px;height:300px"></div> <script> $(function () { var d = [["Unassigned", ...

How can I show/hide elements based on multiple-attributes and multiple-attribute-values?

Hi, I would like to view/hide divs on a page, based on attribute filters. I've made several attributes which can have multiple values. Users can choose which ones they want to see displayed. I can't get the right algorythm (or I don't know which Javascript/jQuery function to use). The following obviously doesn't work. I'm first showing...

jQuery custom click

Hello, I am trying to do the following: $("#something ."+id).click(function() { callFunction(id,message); }); $("#something ."+id).silentclick(function() { callFunction(id,message,'silent'); }); But silentclick gives an error saying function does not exist. How do I go about creating my own custom event like silentclick? ...

How to execute both the local as the global ajax events in jQuery?

Recently making the switch from Prototype to jQuery, I am struggling with some basic issues. I use several AJAX-requests in my application; for 95% of these requests, I'd like to have some global events executed, such as showing or hiding a loading indicator. Apart from the global functionality, every request should also have some custo...

How can I make a for loop in jQuery?

I need to have a for loop inside my jQuery. Example: for(i=0;i<counter;i++) { $("div"+i+"").click(function(){//some code}); } How can I accomplish this? EDIT: This code was posted by the OP in a comment to one of the answers: $("#displayPanel div").click(function (){ alert($(this).attr("id")); } <div id="displayPan...

jQuery :FadeOUt not working with table Rows

I have the following HTML table is rendered to my browser.I am creating this table from my ASP.NET codebehind file. <table Class="tblTradeInCart"> <tr class="tblCartHeader"> <td>Item</td> <td>Model</td> <td> Price</td> <td>Delete</td> </tr> <tr id="tr_15_1"> <td><img src="dia/images/LGVX9700.jpg" width="50" height="50" /></...

On the Fly created/appended Divs-Not able to get the ID JQuery

Hi, I m creating Divs on the Fly .If i try to get the Attribute id of those Divs ..I m not able to get it..Please suggest me... $("#displayPanel div").click(function (){ alert($(this).attr("id")); } <div id="displayPanel" class="displayPanel"> <div id="heading"> Display Panel </div> <br/> <div id="save" class="saveClass"></...

settimeout on hover

hi guys, I am trying to use jquery's hover to clear one timeout (cleartimeout) on a set variable (timer) and then set another (settimeout) once the mouse leaves the element. Any ideas on how to do this? My code so far (that doesn't work!!!!) is: $(function() { $('ul.contact').hover(function() { $(this).clearTimeout...

Escaping text with jQuery append?

I know that I can use $.html to set the HTML content of something, and $.text to set the content (and that this escapes the HTML). Unfortunately, I'm using $.append, which doesn't escape the HTML. I've got something like this: function onTimer() { $.getJSON(url, function(data) { $.each(data, function(i, item) { ...

Getting only a part of a file from Jquery ajax

I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){ $("#loaded_data").after(loadeddata); alert('success'); }, error: function(){ alert('failure'); } }); Loaded data currently returns everything. What I need to is to get only a specific div and after it add it t...

Jquery "THIS".myFuntionName is unavailable when in ajax Success? but ok before...

Hi there, can anyone help, i have an issue with the keyword this.. before entering the ajax call its available but when entering Success. my "this" is available but doesn't contain the same info i.e. a method i wish to call.. This example shows what i mean.. I would appreciate any help, this.isoDateReviver is available before doing aja...

jQuery PrettyPhoto passing ID to iframe

Hi all, I'm trying to use jQuery PrettyPhoto and for some reason it's not passing through the id variable.. if someone has come across this problem before and knows a solution, that'd be fantastic! Here's the code: <a href="/store-item-details?id=5&iframe=true&width=800&height=530" rel="prettyPhoto[iframes]" title=""> <img src...

Load file after page is complete without redirecting

Hi, I am trying to do pretty much the same, as is for example on sourceforge. After a user creates some data, i generate a file and i want it to be offered to him after a page loads. However, i know almost nothing about javascript and simple copy paste of < script type="text/javascript"> var download_url = "http://downloads.sourceforge....

How do I access an input field text with jQuery?

I am trying to use the typeWatch plugin for jQuery. I have this javascript: <script type="text/javascript"> $(document).ready(function() { var options = { callback: function() { alert("a-ok! " + $(this).text); }, wait: 333, highlight: true, captureLength: 1 } $("#customer").typeWatch(optio...

Calling a function more than once in jQuery

Hi guys, I have a function called "go()" which needs to be called thrice on page load. Right now I have called it on the ready event of a div with class "nav". Can someone suggest how can I call the go function thrice. Adding go() calls one after other calls it only once. $('.nav').ready(function() { go(); }); ...

please explain this jQuery statement

What is this doing exactly? this.$blah = jQuery("<div id=blahblah1></div>"); ...

Alternatives to JavaScript eval() for parsing JSON

Quick Question. Eval in JavaScript is unsafe is it not? I have a JSON object as a string and I need to turn it into an actual object so I can obtain the data: function PopulateSeriesFields(result) { data = eval('(' + result + ')'); var myFakeExample = data.exampleType } If it helps I am using the $.ajax method from jQuery. T...

How to addClass to the first td in every tr inside a table using jQuery

I'm trying to add a class to the first td inside a tr w/ a specific class. But for some reason it adds this class only to the first td in the first tr -not the first td in each tr $("#appendTD").find("#gridFormInformation").children(0).children().each( function() { if ($("#appendTD").find('tr').filte...