jquery

ASP.NET MVC Loading a page content into a div using JQuery

I'm using ASP.NET MVC in a project and I have a requirement like this.. It has one main View(Main.aspx) and a Action methods to render the main view. And I have another View (SearchResult.aspx) and Action to render the search results content. I need to load the SearchResult page asynchronously in to a DIV in the main View. Is there a w...

How do I wait for the slideToggle to complete before executing code?

I want to wait for the slideToggle effect to complete before executing the if statement and the fadeIn effect. div_to_move = $(this).parents("div.kind_div"); div_to_move.slideToggle(); if ($(this).html() == "+") { $(this).html("-"); $("div.kind_to", td).append(div_to_move); } else { $(this).html("+") $("div.kind_from", ...

How to use this with JQuery

hi, how do i use this code with jquery, i know it's easy but it doesn't work for me. document.getElementsByTagName('html')[0].innerHTML.replace(/<!--|-->/g,'') ...

Restrict keyboard shortcuts in TinyMCE editor

Trying to find where to disable individual keyboard shortcuts in the jQuery version of TinyMCE editor. Currently the list of allowable shortcuts is: ctrl+z Undo ctrl+y Redo ctrl+b Bold ctrl+i Italic ctrl+u Underline ctrl+1-6 h1-h6 ctrl+7 p ctrl+8 div ctrl+9 address Currently looking to disable all shortcuts but Undo, Redo and b...

can i call one js file from another . .

i have an asp.net mvc app and i am trying to move all of my javascript out into js files. right now i have one called sharedfunctions.js which is used all over the place. the issue is that if i move some code into a js file that is calling a method in the sharedfunctions.js file, it no longer seems to work. what is the best way to be ...

jquery inserting html doesn't work

I have got a table where i want to insert html in a td on the next row. I pasted one row below. <tr class="content"> <td align="center"> <a class="version" href="theurl">click here to update the td in the row below</a> </td> <td align="left">col 2</td> <td align="left">col 3</td> <td align="left">col 4</td> ...

Rotating Product images so they look like there merging into a differnent view

Imagine a page with three thumbnails on of differnent product views. When you click on a view the main image div would quickly transition into the new view. Say it was a shoe i was photographing and it had a sole view, top view and side view. My question is is there any way of giving the illusion of a spin e.t.c from one view to anot...

jQuery: detect ajax call

Is there a way to detect when one of the plugins successfully completes ajax call using $.ajax. I am using a treeview plugin that calls asp.net webservice, and I want to attach context menu to the branches/leafs once they've been loaded. ...

enabling drag and drop on a touchscreen mobile device

Hello all, I just recently got an android phone and found that the drag and drop on my site doesn't work! I understand why it wouldn't, but has anyone found a solution to this? I'm using JQuery to implement the D & D... ...

Setting -webkit-gradient backgrounds via jQuery doesn't work

Defining gradients in CSS works fine, but when I try to do this with jQuery, nothing changes. Typing $('#header').css({background: '-webkit-gradient(linear, 0% 0%, 100% 100%, from(#cfc), to(#afa)'}); in Chrome's (4.0.249.43, Linux) JS console (in page's script tag too) really does nothing (but returns jQuery object, so it's valid). Tr...

Need some more help with jQuery and textbox character count

I have the following code to count and trigger some functions using jQuery: jQuery('#input_guideName').keyup(function(e) { if(this.value.length == 5) { jQuery("#guide_btnCreateGuide").css({'background-position':'top', 'cursor':'pointer'}); jQuery("#gu...

difference between xmlhttprequest and $.ajax(), $.load

what is actually difference between xmlhttprequest and $.ajax() i want to know which is the lightest function from above to load data.... ...

ASP.Net + MVC + VS 2008

I am using asp.net MVC with Jquery. I use RenderPartial method to load control and open as modal dialog. After submit small form on modal dialogue i want to get focus on same dialogue in case of error. Javascript $(function() { $("#dialog").dialog({ bgiframe: true, height: 180, ...

Remove a CLASS for all child elements

Given the following HTML: <div id="table-filters"> <ul> <li class="active">blah</li> <li>blah</li> <li>blah</li> <li>blah</li> </ul> </div> Using table-filters as the jQuery selector, how can I clear out the elements having CLASS=ACTIVE, no matter which LI it happens to be on? thanks ...

jquery compatibility problem

Why does the following work in firefox but not in IE? $("#bCompare").bind("click", function(e){ $("img[src='s1.gif']").each(function (i) { $("#cSelected").append("<div class='cHolder'></div>"); }); }); UPDATE 1: A commenter mentioned I haven't put in enough in...

JQUERY, Returning the object that was clicked to add a Class

Given the following: <div id="table-filters"> <ul> <li class="active" onclick="myfunc();">blah</li> <li onclick="myfunc();">blah</li> <li onclick="myfunc();">blah</li> <li onclick="myfunc();">blah</li> </ul> </div> function myfunc() { // Activate the LI clicked $(this).addClass("active"); } I ...

jQuery: document ready fires too early for my requirements..

Hey there guys, I am developing a site based all around photos. Some areas of this site require calculations based on image dimensions in order to work correctly. What i have found is that document ready is firing too early and my gui is behaving erratically as a result. I removed the document ready function and replaced it with the go...

Jquery UI dialog and sortable columns #dialog class issue

Hello @all , I succeed to create a sortable portlet system for a excisting cms. I also made a dialog pop where i can change true a form the title and in the future some more content within the dialog ,for each portlet. However my issue is that the #dialog shows the form inside my page before i click the icon. When i click the icon , t...

jQuery Selection Issue

Im currently writing some form validation with jQuery and having the followin problem.. I give ids to my inputs in such a way that when data is posted, i have an array to work with like so.. <input type="text" id="user[name]" /> <input type="text" id="user[email]" /> This means that when the data is posted to my script, i will have a...

jquery traverse html result of $.get(url, function(data){

Hi, I'm wondering what the correct syntax is to traverse the data returned of this function: $.get(url, function(data){ alert(data); }); data.find("table") or similar does not work. The returned html data looks like this, parsed from a django template: <div class="pagination"> <span class="step-links"> ...