jquery

jQuery events are punching me in the face

I've spent the last four hours trying to figure out why my jQuery events are firing multiple times for something that can only happen once. Basically, I have an ad banner that will be rotating images with jQuery. I'm waiting until the page loads to load all the images except for the one that is shown by default: $("#mainadslot").prepend...

Ajax success message JQuery

Hi, i am using JQuery in my app developed using cakePHP and Mysql.. In this JQuery, $.ajax({ type: "POST", url: "./updateField", data: "name="+fieldname, success: function(msg){ alert( "Data Saved: " + msg); }//success });//ajax The database operations are going correc...

Hiding a table row according to a value

Hi, I do not find the right expression to select table rows that must be hidden according to the value ofe the cell on which the user has clicked. I have several rows similar to this: <tr id='row2'> <td class='col1'>val 1</td> <td class='col2'>Val 2</td> <td class='col3'>val 3</td> <td class='col4'>Val 4</td> <td class='col5'>Val 5</td>...

reset multiple css styles for one single div element

Hello, my question is if it is possible to reset css styles (a lot off them) for a single div and all elements that are contained in that div. I am asking, because I found this tutorial for a jquery shoutbox that has it's own css file. I can not just copy the styles over to my own css file, because it will screw up the rest off the pa...

JSON save in Database and load with JQuery

I create a huge JSON-Object and save it in my database. But when I load the "string" and echo it in PHP, I can't access the JSON Object in JQuery. Do I have to consider something if I want to save my JSON Object in a MySQL Database (when I just create the Array and then echo it with "echo json_encode($arr);" it works fine, but I need to ...

jQuery .toggle() not working with TRs in IE

I am using jQuery's toggle() to show/hide table rows. It works fine in FireFox but does not work in IE 8. show()/hide() work fine though. slideToggle() does not work in IE either - it shows for a split second then disappears again. Works fine in FireFox. My HTML looks similar to this <a id="readOnlyRowsToggle">Click</a> <table> <...

jQuery Plugin does not work in a Modal

I am using this in a modal: http://www.web2media.net/laktek/2008/10/27/really-simple-color-picker-in-jquery/ but it does not work. The same code: //Start of document Ready which contains event handlers $(document).ready(function() { $('#ForeColor').colorPicker(); }); <input type="text" value="#333399" id="ForeColor" class="colourP...

DOM selection in jquery

Hi, i have a table, and i did sorting of that. Its execution time bad. I guess this is because of DOM manipulation. /* I m converting to array */ var rows = $table.find('tbody > tr').get(); $.each(rows, function(index, row){ /*then again to 2D array */ if(($(row).children('td').eq(0).attr('class').indexOf('collapse') != -1 ...

Jquery and Xpath XML parsing

I want to parse an XML using jquery. Is it possible to parse using XPath. is there any functions for that in jquery?? ...

What jQuery plugins should be incorporated into jQuery or jQueryUI

jQuery plugins are great, except this is about a billion or so of them1, and most of them however will fade into the background noise of the rest. What are those plugins that are so useful that they should be incorporated into jQuery or jQueryUI (if it's a UI/effect type) or included in a jQuery bundle? 1- billion is just a rough estima...

Prototype has hash.inspect() method. What is the equivalent in jQuery world?

I am using jQuery. I am dealing with JSON object and time and again I need to look at the data. I do alert(data) and I get nothing useful. In the Prototype world they have inspect method which is highly useful. inspect method in Prototype I am looking for equivalent method in jQuery. I looked at the API and couldn't find anything. I a...

ASP.NET MVC Ajax (jQuery): generate code server-side?

Hi, I want to load some html data dynamically from the server (like a grid composed by lots f and ) using jQuery. At the moment I load it like this: $("#Ricerca_Div_ContenitoreRisultati table tbody").load("/Segnalazioni/CercaSegnalazioni/3"); and generate it like this: public ActionResult CercaSegnalazioni(int flag, string sort...

Multiple AJAX (jquery) calls causing extreme slowness and crashing

Hello, I wrote some code that asks for a user to enter a date range and click the next button. This triggers an AJAX call to a file that figures out what dates are included within those days and prints them out onto the screen. If the user changes the dates and presses "next" again, it does the calculation again. After doing this sever...

How to assign form name to variable as string in jQuery?

if($(currentTab+' form.dataform').attr('name') !== undefined) var $selectedTab = $(currentTab+' form.dataform').attr('name'); else var selectedTab = '0'; alert($(selectedTab)); Gives me an object. I need string. How? ...

How to Customize Hyperlinks on Client Side in ASP.NET MVC

I need to be able to do two things with Javascript or JQuery, without involving third-party open source libraries: Use a jQuery or Javascript function to fill the HREF attribute of a link. Perform an HTTP Get or Post operation OnUpdate of a text box or combo box (using the above javascript function to specify the HTTP target) The end...

How to replace all content of <body> but a <div> with jquery ?

I got a markup with the following structure : <body> <h1>Title</h1> <p>bla</p> <div> ... <!-- a thousand tags --> </div> <div id="do-not-modify-me"> <!-- a hundred tags --> </div> </body> I wish to do a little search an replace in the body, but this must not change #do-not-modify-me because it has JS events attach...

jquery validator addmethod custom message

I've created a method for jquery's validator plugin, that works like the remote rule. The difference is that I'd like to display a dynamic error message (based on the ajax response). jQuery.validator.addMethod("duplicate", function(value, element, params) { var object_settings = this.settings; params.data[$(element).attr("name...

jQuery Autocomplete with images :a small customization

Hi All, I am a newbie in jQuery. I am trying to use the auto complete jQuery pluggn in my ASP.NET page .I downloaded the sample from the site and trying to rewrite it from PHP to ASP.NET Can any one help me to rewrite it ? <script type="text/javascript"> $().ready(function() { function findValueCallback(event, data, formatted) { ...

jQuery click brings me to top of page. But I want to stay where I am

I have a simple click and show, click and hide button, but when I click it, the page anchors at the top of the page. Is there anyway to prevent this? So that when I click the button, I stay at the same place in the browser? My code is.. $('#reportThis').hide(); $('#flagThis').click(function () { $('#reportThis').show("slow"); }); $('...

How can I use Jquery's Coolinput to show the hint "Enter your password" in a password field, but then use stars to hide the input when user types?

pretty self explanatory... ...