I'm using the jquery in place editor, and I need to get the value of a custom attribute in order to send it with the form. The jquery I have is as folder... (the bit I'm having trouble with is highlighted)
$(".edit").editInPlace({
url: "./server.php",
params: "folder=" + $(this).attr('folder')
//show_buttons: true
//$('.edit').attr('folder')
});
And the html is as follows:
<span class="edit" folder="folderName">text to edit</span>
As you can see, I need to get jquery to get the attribute 'folder' value, in this case the value returned would be 'folderName'.
I have been learning jQuery and have been loving it so far. But can't figure out how to do the following... 1) Find the <a> inside a <ul> that has an active class. 2) Grab the value from the parent <li> and put it into a variable to be used elsewhere.
Here is the example markup... <ul id="carousel"> <li class="carousel-item" carouselindex="1"> <a href="/someurl"><img src="/someimg" alt="" /></a> </li> <li class="carousel-item" carouselindex="2"> <a class="active" href="/someurl"><img src="/someimg" alt="" /> </a></li> </ul> So, in this example, I'd like to return a variable that = 2.
Here's what I'm trying to do: 1) I get reference to a div that's on my page: var theDiv = $("#" + divID); 2) Now I want to add a custom attribute tag to it, so for instance I want to add "winWidth" so that the div object now contains "winWidth=" for instance. 3) I want to set winWidth now since it's part of theDiv to a value
I'm not sure how to really do 1 + 2. I need to do this on the fly because some javascript logic later will add these attributes dynamically to the div... outside of what the original div had...I don't care what it had, I know I have it now in a JS variable and now I want to both add some new attributes to the div, and then set them on the fly. I don't need these attributes to be on my page, I just need them added to my div variable reference.
i have found a possible bug in 1.4 but it's only in Internet Explorer 7 & 8.The following code does not work and completely ruins every peice of jquery on the page (that means everything inside $(document).ready and anyting else...
I cant see any syntax errors - i pulled the example from the 1.4 site. There is no trailing commas in the object notation and i really cant see any reason it would work in firefox and not IEx and more to the point not only not work in IEx but break any other jquery in the entire page....
I'm working with a large (and unweildy) ASP.NET application, and there is a lot of jQuery code that uses selectors like this:
[name=_aspnetControl$_withASubControl] And unfortunately, some selectors that also look like this:
[name^=_someAspNetControl$_radioButtonList].
In other words, the effort to remove the $ from the attribute selectors would be monumental. If it is possible to escape the $ symbols, I can do that easily enough, but unfortunately the situation right now means that I can't upgrade to jQuery 1.5.
I'm learning jQuery with XML. I'm familiar with other query languages such as XPath. I'm having a little bit of difficulty wrapping my brain around how jQuery works but I think I can make the leap if I see a solution to a problem I know how to solve with other methods Given the following XML, please share a jQuery solution to finding the value of attribute B in elements named bar where attribute A has the value 30:
I'll trying to tell the difference between the following three cases:
<img alt="text string" /> <img alt="" /> <img />
I can do this in Firefox with the following code, where elem is the HTMLElement representing each image, but IE doesn't seem to differentiate between empty string and undefined.
var alt = elem.getAttribute('alt'); alt = (alt) ? alt : ((alt===null) ? 'really_null' : "");
The desired output from running this code on the 3 tags above is:
text string
really_null
It seems like this should be really easy...but I'm having a really difficult time trying to figure out what's going on...
I was reading about delay() in the API ref and it mentioned it used the standard effects queue or a custom queue, but didn't illustrate how you set up a custom queue.
I have a table that sorts in jquery and I have one column that I would like to always remain the same while the other columns sort around it. What I want is for the order of the column to always be Great, Bad, Failure while every other column can be sorted. What is the easiert way for me to do this?
I am having trouble downloading any custom theme that I create using themeroller on [URL] the session just hangs and then gives up once the download button is pressed.
this happens in ie 8 in windows 7 and Firefox 3.6 on OS X
obvious...they're not necessarily obvious to me yet.I am writing some basic image gallery functionality, using my owndefined jquery functions.I am trying to use .each() to loop throughthe "image" tags of an xml file, and create a thumbnail for each ofthem. I want to catch the index of each iteration to create avariable I can use to match my thumbs with my full-size images...
i have a script, that adds a custom DOM property to <li> elements (.qqFileId=2 f.i.). Is it possible to select the list item with jQuery by the value of this property? $(...)
How can I create a custom textfield with buttons? Can I use JQuery to do that? See my attached image for a explanation of what I need to do.AttachmentstextfieldButtons.pngSize : 1.2 KB Download : 324
function callFunction(param1, param2) { } this function is called when a user clicks on an image onClick='callFunction(1,2);' etc.
How do I apply live to callFunction? The image appears from an ajax call and as such the function doesn't recognise the call. I've used live on my other simple functions, but how would I use it on my custom function? The reason I am using the custom function is because I need to pass parameters to it.
I have a problem with jquery not working in JSP. I have downloaded a theme in jquery but it does not seem to work. And I do not know what is the problem why it does not seem to work. I am very new to jquery and JEE. I am actually rushing this project as the deadline is very near.
this is my jsp code: (the markup is from the demo of the theme I downloaded in jquery theme roller since I meant to see how it would look first before implementing) code...
I am allowing users to make parts of a list hidden/visible etc.Basic list, but the very end list item has some custom CSS "border-bottom: none" - just to make it a bit more nicer looking. When I use the last selector, to add some custom CSS, it works perfect. My problem is when I hide the widgets, they are hidden as intended, but the custom CSS is used on this and as these are hidden, the border still shows up.My question is how do I apply CSS to only the last visible child?