Based on this answer - http://stackoverflow.com/questions/3778647/how-to-change-classes-on-click
can somebody explain me what exactly the code below is doing?
$("a").click(function() {
var $this = $(this); // this is just for performance
if(!$this.hasClass('yy'))
$('.yy').toggleClass("yy").toggleClass("xx");
$this.toggleClass(...
Judging from the lack of info around, I'm guessing the following question maybe a little "off piste" as they say..
I am trying to find an XML based javascript (pref. JQuery based) templating engine..
A little like say how Ext.JS (Sencha) do things, or SPRY datasets. Something lite..
Obviously there are lots of JSON based ones, and f...
Internet Explorer seems to be ignoring this .live function call during updating records but it works fine in FF.
if
$("form#updateform").live("submit",
function(){
line is changed to
$("form#updateform").live("click",
function(){
update function is working perfectly in IE but in Firefox if i click on any object it take...
I want to read in real time the output of a subprocess called from a form in a view. Here is my views.py:
@login_required
@condition(etag_func=None)
def sync_form(request):
# do things to validate form
return HttpResponse(sync_job(request, job_id, src, dest))
def sync_job(request, job_id, src, dest):
# we check the argument...
Hey guys,
I'm using WordPress as my CMS and I just downloaded a Lightbox plugin for a photo gallery on one of my pages. It works exactly how I want it to, except for one thing.
After clicking on a thumbnail to get the photo enlarged with a lightbox effect, I want to be able to click on a link to take me to the main article where that p...
I am looking for a jQuery image zoom script with functonality as like in this link.
Has anyone done this before?
I am looking for scripts which supports with ASP.NET.
...
Hi.
How Can I Open Jquery Dialog with and image button that putted in Gridview Template Field?
<asp:TemplateField HeaderText="افزودن">
<ItemTemplate>
<asp:ImageButton ID="add" runat="server" CausesValidation="false" CommandName="adddetail"
...
Hi all,
I am generating dynamic text boxes in my application. I need to compare the values in each dynamic text boxes when I click the submit button.
Can any one please help me by providing some ideas or sample codes to solve this task?
The solution might either be in jQuery, Javascript or C# asp.net
...
this is my code :
<div id="test" style="width:200px;height:100px;background:red" class="tabs change_font_size">
<div>
<a class="delete" style="float:right;font-size:20px;text-decoration:underline;cursor:pointer;">delete</a>
<form action="/" style="background:blue">
<input type="text" name="text"/>...
I'm trying to increase a number on each iteration of a for loop, in jQuery (1.4.2), by the width of the previous element.
I've tried the following:
var
$lis = $('#bookmarks > li'),
liHeight = parseInt($lis.height()),
numLis = $lis.length;
console.log(numLis);
var totalLeft = '0';
console.log(totalLeft);
for (i=1; i<numLis; i++) {
...
I've been using a lot of slideshows recently on my sites and one thing thats puzzled me is using more than one slideshow per page. I'm currently working on my own site, experimenting with Jquery Accordion. I've managed to adopt a very simple javascript slideshow, see below:
http://dvpwebdesign.com/test/accordion/blank.html
However i'm ...
Hello all,
I'm trying to send some data in an Ajax call to update a record in the server
var OrderNotes = $.ajax({
url:'AjaxActions/OrderNotesUpdate.aspx?OrderID=' + OrderID + '&Notes=' + $('#txtNotes').val(),
async:false
}).responseText;
"Notes" are in unicode.
When...
i can use this to make a json on web browser:
var json_string = JSON.stringify(array);
but , it has not a object named "JSON" on iphone ,
so what can i do ?
thanks
...
Hi,
i get an strange error "invalid quantifer" ... can somebody help me please?
html
<input type="text" value="5+5" id="test"/>
JS
ups = {};
ups['2'] = new Array();
ups['2']['cmd'] = '#(\-|\+|\*|\/|)[0-9](,|[0-9]|)(\-|\+|\*|\/)[0-9]#gi';
var inp_val = $('#test').val();
if (inp_val.match(ups['2']['cmd']))
{
$('...
I have a button that performs an ajax post -- I want to disable the button, then perform my work, then upon completion -- I want to re-enable the button. My interaction includes swapping out the image button (to a grayed out image button), and presenting a spinner. When complete, I hide the spinner and restore the original button image. ...
hi all im building a menu and im trying to put an hover effect on each menu item
but... when i hover everything is working great and i get the html i want and the menu item has a backgruond image.
but the unhover effect dosnt fire most of the times. i found out that if i move my mouse horziantly across the ul menu it works fine. but if ...
Hi,
I'm just using a simple slideToggle function of jQuery. It works properly in my HTML file. But whenever I take codes into a ASP.NET WebForm project, script doesn't work. I can't achieve slide effect.
Is this a known issue? It's probably a popular mistake done by developers though. What could be the problem? Any possibilities?
(I d...
hi am having a problem, am using tabswitch from
http://www.hieu.co.uk/blog/index.php/tabswitch/
am trying to add extra functionality to return the total number of tabs
am trying to return a value within the function
the alert statement in getLength outputs the correct value
but the value returned is undefined
here is my code:
//the...
I have the following code for submitting data using ajax from forms of class ajax. this works perfectly in Firefox, Safari and Chrome but fails in IE.
ajax: function() {
$('form.ajax').live('submit', function() {
var form_ajax = $(this);
$.ajax({
url: form_ajax.attr('action'),
data: form_ajax.s...
In the html page shown,where is window.onbeforeunload = confirmExit code to be placesd so that when validate div is shown the alert message does not appear when the user clicks on cancel or save button.And if the user clicks or any other link the alert message should be shown
If any other link is clicked makeajaxcall() function should b...