Html element contains complex & unique id, composed from namespace as prefix and incremented index - as postfix.
I try do it with wildcard expression for id.
If to use simple way without namespace, that it works fine:
$j("[id*=service_selected_]").click(function(){
...
In order to keep uniqueness,i need provide namespace part within...
I'm working with a third-party product. It uses JavaScript (non-JQuery) code on the page to generate DOM elements on the fly.
Is it possible to run a jQuery script whenever this third-party code generates a DOM element matching a given selector?
To explain in another way, I don't want to try and integrate with that code. I just want to...
I have written some code that works using ASP.Net, C# and AJAX update panels.
I have created this user control, in which a repeater is populated by the contents of the BusinessTier datatable. For each business tier, there are associated business levels which populate a drop down list from the BusinessLevel datatable.
One business level i...
I have a little trouble understanding scope and lifetime using javaScript and jQuery. I have a function that takes an array of custom objects (gps is an array of groups)
var currentGroup;
for(var index = 0, length = gps.length; index < length; ++index)
{
currentGroup = gps[index];
var newGroup = $('<li id="groupno-' + currentGro...
Losing my mind on this one..
How can I do something as simple as..
If div has class "something" then make div#test have a class of "awesome"
<div class="something">hey there</div>
<div id="test">Am I awesome?</div>
Much Thanks!
...
I have a script that does a jquery AJAX post and then should redirect to a different page. The problem is that it is sometimes redirecting before the post completes. There seems to be a couple of solutions but I can't get any of them to work. Thanks for your help!
Here is my code:
$.post("cart.php", { 'products[]':postvalues }, function...
I want to create a jQuery iterative timer. For this I wrote the following script:
$(document).ready(function(){
var t;
function x()
{
alert('x')
t = setTimeout("x()",1000);
}
x();
});
First time the function x() called successfully. But from the next function x() is detect as undefined. What could I...
I currently have something similar to this, it loads a div on the target page that has images in it.
$('a.galleryNext').click(function(){
// chnage the image to loading
$("#info").html("LOADING");
$("#currentGal").load("gallery.php div#gallery"+currentgallery, function(){
//this fires much too early, the images are s...
i'm trying to write a jquery plugin that when i click on a image to pop an alert message. Those images are loaded via load() method. Is there possible to load the plugin on document ready and the plugin to have acces to the loaded content? i don't want to use a callback function, i just want to include the plugin in the html page and the...
I've recently started encountering a very strange problem. To be honest, I'm not entirely sure how to describe it other than to just show it.
Here's the relevant HTML:
<div class="component container w100 noEdit" id="contentWrapper">
<div class="component container w50" id="container1">
<div class="component text w50" id="text1">...
I noticed prior to posting this question that there have been similar questions posted on this topic before, however the user isn't interacting with the text field by using the keyboard in this instance, in such case binding the text field to the "Paste" action or any of the other nifty suggestions wouldn't work in my case.
Our users ar...
Using jQuery, I'd like to remove the whitespace and line breaks between HTML tags.
var widgetHTML = ' <div id="widget"> <h2>Widget</h2><p>Hi.</p> </div>';
Should be:
alert(widgetHTML); // <div id="widget"><h2>Widget</h2><p>Hi.</p></div>
I think the pattern I will need is:
>[\s]*<
Can this be accomplished without...
Hi,
See Example
After clicking the show container link the datepicker component - 2nd input - is shown below the UI dialog. What should I do to show it above the UI dialog?
...
Hi
I've got this markup (simplified):
<div class='item'>
<a> one link </a>
<a class='trash'><img src='trash.png'/></a>
</div>
I'm highlighting the div when the mouse enters, and showing the (otherwise hidden) 'trash' link (it's like a tiny trash bin) so the user can delete the link.
I can't use 'hover' effect, because I need the...
I don't have enough space to change its width on click or any stuff like that.
I need the main select to keep its orginal size with wider options.
I'm using jQuery / IE6
10x
...
The workflow is simple:
You click inside a textarea.
The text is copied to the client's clipboard.
Display notice to the user.
How do you do it?
...
I have a text field to which I have a jquery autocomplete event attached. However, due to some reasons, I dont want the search results to appear when the user types, but rather when a button is pressed. I know this sounds lame, but I have my reasons. How do I trigger the autosearch results to appear by calling an explicit function?
...
Hi -
I'm trying to use jQuery's keypress to trigger a button click on a modal dialog created using the jQuery dialog function. The problem is, with the following code, it works the first time around (pressing enter presses the Save button) but I get erratic behavior when I close the modal dialog and reopen it. I'm thinking some variant o...
I can call call my ASP.Net page methods fine if I use POST but if I try GET it fails.
Any ideas why?
var url = encodeURI(acx.opts.queryURL + "?t=" + acx.input.val());
acx.requestExe = $.ajax({ type: "GET",
url: url ,
//data: "{\"t\":\"" + acx.input.val() + "\"}", //Data To Send If POST
contentType: "appl...
Hi,I am new to Jquery. Please excuse me if this a very basic question.
how can we make 'append' wait until the previous 'append' is complete. I am appending huge amount of data so the present append should check if the previous append is complete. I am able to do this by giving all the append's independently with some time delay. B...