jquery

Is Minus Zero some sort of JavaScript performance trick?

Looking in the jQuery core I found the folloiwng code convention: nth: function(elem, i, match){ return match[3] - 0 === i; }, And I was really curious about the snippet match[3] - 0 Hunting around for '-0' on google isn't too productive, and a search for 'minus zero' brings back a reference to a Bob Dylan song. So, can anyone t...

Display contents of a file

there is a file as data.html.How to display the contents of this file using javascript or jquery Thanks.. ...

Override absolute position on child container (modal window)

I have a modal window that is pulled from the server and inserted into a container that is absolute positioned. When that window is triggered to open, it does not display properly, it positions itself inside the container and most of it is hidden. Is there a specific css to be written for the container of the modal window (MyModalWindow...

PHP script for creating calendar table or jquery complete solution required

Ok so this is what I want to make: red = booked green = available I have data in mysql in the format of: property_id, booked_from, booked_until . Before I start trying to create the correct loops etc to create and style the table, i thought i best ask if there are already good jquery plugins / php classes create this visual interfa...

Bookmarkabale ajax calls with MVC routing

I have a page with a menu that uses JQuery AJAX calls to populate the page with. To reflect any changes I update the URL with a #... instead of ?... or /... So an URL that originally reads : htpp://localhost/pages/index/id=1 would look like : http://localhost/#pages/index/id=1. If a user bookmarks this, and later comes back to the page, ...

how can I get jquery.sIFR plugin to display sIFR-alternate text for print?

I'm struggling with this. I've used the jquery sIFR plugin as opposed to sIFR it prevented conflicts with other jquery I am using on my pages. It works fine in its prime function: replacing html text with Flash. However, the .sIFR-alternate class is given an inline style of 'opacity: 0' which persists when flashblock is on. So alternat...

jQuery performance

Hi Folks, imagine you have to do DOM manipulation like a lot (in my case, it's kind of a dynamic list). Look at this example: var $buffer = $('<ul/>', { 'class': '.custom-example', 'css': { 'position': 'absolute', 'top': '500px' } }); $.each(pages[pindex], function(i, v){ $buffer.append(v); }...

Getting ID of a cloned element

I'm using jQuery draggable and droppable. I'm cloning the draggable widget on drop event of droppable. I want to fetch the ID of the cloned element which will be sent to the the application with the AJAX request. I'm unable to fetch the ID. console.log returns blank string. var dropElem = ui.draggable.html(); var clone = $(dropElem).cl...

Finding and replacing content between brackets with jQuery

I have a requirement to place text between brackets using jQuery; the content will be updated once an action occurs e.g. search. The structure is: - <h2>Placeholder Text Placeholder Text Placeholder Text ()</h2> ...

jQuery Ancestor Listener

How to fire an event when an ancestor of an element is removed or no longer displayed in the document? Thanks ...

Save a form in an XML file using Ajax and JSP

Hello, I want to create a simple form with a name and an email and save these data in an XML file. So far I found that using Ajax with jQuery is quite easy. So I used the usual code: //dataString have the values taken from the form var dataString = 'name='+ name + '&email=' + email; $.ajax({ type: "POST", url: "users.xml", data: data...

asp net mvc client validation with partial views and AJAX

Hello, I'm using client validation function of the MVC 2.0 framework (with Html.ValidationMessageFor() and Html.EnableClientValidation()) Everything is nice, when I use the validation in a simple form. But when I get this form via jQuery AJAX $.get('PathToMyForm', function(htmlResult) { $('selector').html(htmlResult); }); clien...

Link to external source or store locally

When using third-party libraries such as jquery, yui-reset, swfobject and so on, do you link to the hosted versions, or download and host your own versions? Pros and cons either way? ...

What is the way to show the progress of calculations?

Hello, I would like to monitor my program which is running on the web server. Can I draw the progress bar or simply show the percentage which is returned by my code? The php script is spawning the external code with parameters. $Status="rendering..."; $cmd = "cd $rpath && $envopts /home/arm2arm/bin/sph2grid"; $shellcmd=$cmd.$params.'...

JQuery UI (Dialog with Javascript)

Hi everybody, how's it going ? I'm trying to open an dialog component of jquery ui and load the content of the dialog with Ajax (partial view of asp.net mvc) and it's working good. But, the content of Dialog has some javascripts and when the scripts inside the dialog are executed, the behine page lost the style and content disapier sho...

jQuery check offset

HTML: <ul class="clients"> <li> <div class="over left">Description</div> <div class="inner">Image</div> </li> </ul> CSS: .clients { margin-right: -20px; } .clients li { float: left; width: 128px; height: 120px; margin: 0 20px 20px 0; border: 1px solid #c2c2c2; } .clients .over { display: none; position: abso...

jQuery autopopulate select drop down from JSON issues

I have an issue regarding to auto populating a select dropdown from jQuery/JSON data which is return from a ColdFusion CFC, the code is below: $(function(){ $("#licences-add").dialog({autoOpen:false,modal:true,title:'Add Licences',height:250,width:380}); }); function openAddLicence(intInstanceID,szName,szDatasourceName){ $.getJSON('/...

How to register a VB.Net User Control with jQuery

Greetings and thank you in advance for the help. I created a user control in VB.NET that uses a jQuery datepicker. I am at an impasse. The code I have works for one datepicker control on the page but because I can only register the client script once, it will not work for multiple instances/datepickers on the same page. What is the b...

add parameter to links on page using jquery

How do I add let's say something like ajax=1 to all links on my page with jquery. I will also need to check if the url has existing parameters. for example "http://mysite.com/index.php?pl=132" will have to become "http://mysite.com/index.php?pl=132&amp;ajax=1" Also, if the link does not have any parameters, for example "http://mysite.com...

Jquery datepicker that consumes json data which are future dates...

Is there any jquery datepicker that consumes json data... My json data would be a list of future dates that belongs to any month should be consumed by my datepicker which should be disabled and highlighted with a color.... ...