I have a menu in which i need to list child for a particular parent only but on click of child item the page gets refreshed and all the child gets expanded so my query is can i use
htp.p(' $(this).parent(''.parent_menu'').find(''.child_menu'').slideDown("slow");');
after
htp.p(' $(document).ready(function(){');
As when i am trying ...
There have been a lot of other posts related to this but I can't seem to find the answer to my question. I'm trying to parse an XML file of the following form to return only the items under the 'subGroup' node.
Here is the sample XML:
<?xml version="1.0" ?>
<resultsGroup>
<item>
<id></id>
<title></title>
<descriptio...
Hi,
Actually, I am new to jQuery and I am writting a sample page with jQuery functions. In this page I am making use of toggle function. Please help me to get the intended effect. I am trying to get it but it is not working properly.
The effect I am trying to apply is;
There are 2 buttons on the page, say Button1 and Button2.
There ar...
Hi,
Using jquery, I'd like to get the javascript from an A tag's onClick attribute.
<a href='#' onClick='alert("boo");' />
In Firefox: alert($('a').attr("onClick")) shows: alert("boo")
In IE 6/7: alert($('a').attr("onClick")) shows: function anonymous(){alert("boo");return false;}
How can I retrieve just the javascript, and not the...
I need a function to select all elements with a custom attribute, and take its name and value. for example:
<input type="text" my:name="koni" my:age="20" my:city="New York" />
Note that my is always the same, but that behind not. in my function i then want to say:
var attr = //here should be the attribute (attr, or attr2)
and
var ...
I have a Default.aspx page which loads a popup using JQuery Nyromodal popup.
Within the popup I have which needs to postback on clicking the button.
But when I click on the button in the popup window, URL in main window is replaced with popup window URL and also the data in modal popup is not posting back.
Thanks
...
I have two divs $('.list') and $('.content') side by side. $('.list') is resizable using jQuery UI resizable and $('.content') is bound to the alsoResize.
The problem I am having is I need to know when the resizable event is triggered. .bind('change') or .bind('resize') don't work because resize is only for the window/frame and 'change...
I'm using the jQuery package located at http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html to convert my existing checkboxes to iPhone style checkboxes. The problem I'm having is that,after applying the jQuery/iPhone styles, my checkboxes' onclick events do not fire when the checkbox status changes. I need to be able t...
I've seen different developers include semicolons after functions in javascript and some haven't. Which is best practice?
function weLikeSemiColons(arg) {
// bunch of code
};
or
function unnecessary(arg) {
// bunch of code
}
...
Hi,
I'm trying to consume an ASP.NET web service, using jQuery's Ajax methods. I want the return type of the web service method to be JSON-formatted data, and I'm marking the method with these attributes:
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public MyObject[] GetMyO...
I'm parsing an XML file and trying to return the output to a div. However, for some reason .append() doesn't seem to be generating the correct HTML output.
Here is the JQuery snippet:
var list = $('<div class="response">').appendTo(this);
list.append('<ul>');
$('item',data).each(function(i){
var dow = $(this).find("day").text();
...
Hi, I'm working with connected sortable lists and need the ability to add an extra list, but it just doesn't work.
I have an XHTML like this:
<div id="content">
<div class="line">
<span class="element">1</span>
<span class="element">2</span>
<span class="element">3</span>
</div>
<div class="line">
...
I have the following code:
jQuery:
$.ajax({
url: '/personcontroller/getperson',
cache: false,
type: "POST",
data: $('#person').serialize(),
success: function(data) {
alert('yay');
}
});
});
Controller:
public ActionResult getPerson(Person person)
{
return new Json(person);
}
Html Form/Spark:
<form id="person">
<i...
Hello,
With jQuery I am trying to determine whether or not <div> has content in it or, if it does then I want do nothing, but if doesn't then I want to add display:none to it or .hide(). Below is what I have come up with,
if ($('#left-content:contains("")').length <= 0) {
$("#left-content").css({'display':'none'});
}
...
I am using the latest jQuery Tabs, and all of my tabs (and other content above them) are within a containing Div. There is a form in one of the tabs, and when the form is submitted, it is processed via AJAX, and then the returned HTML replaces the entire containing Div. This returning HTML includes the tabs again.
After the HTML is repl...
I'm using JQuery to design an application where the user can drag elements inside of a div that automatically adds scrollbars and expands the scrollHeight/scrollWidth as needed. I need to fire off an even when the scrollHeight and scrollWidth of the container div are changed.
No, don't want to use the scroll event because 1) scroll doe...
If I have one div element for example and class 'first' is defined with many css properties. Can I assign css class 'second' which also has many properties differently defined to this same div just on some event without writing each property in line.
thanks a lot
...
jquery intellisense works fine with standard setup (asp.net mvc)
<script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script>
with jquery-1.3.2-vsdoc.js in same folder
if added new script to head like
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
...
How do I find out if the users have checked any of the boxes with jQuery? Thanks.
<div id="boxes">
<input id='id1' type='checkbox'>
<input id='id2' type='checkbox'>
<input id='id3' type='checkbox'>
</div>
...
I'm trying to select a particular set of div elements and change their height properties to auto. The jquery code I use to do that at the moment is:
$("div#TreeView1 td > div").css("height","auto");
Unfortunately I have to use the MS javascript lib (despite my protests). How can I do something similar using Microsoft's ASP.net AJAX?
...