I've got some html that looks like this:
<div>
<span class="red">red text</span> some more text <span class="blue">blue text</span>
</div>
What I want to do is use jQuery to remove all the spans within the div regardless of attached class, but leave the text within the span tags behind. So the final result will be:
<div>
red ...
Can someone help me out with this please...
I am doing a web form. I would like to insert the dollar sign into some INPUTs that have a numberfield class. I want the user's content to follow the dollar sign or course.
This inserts the dollar sign OK, but the content ends up in front of it.
$('input.numberfield').val('$');
NOTE - the ...
When I run the code the click event works the first time. When I click it more then one time it seems that the click even has unbounded. How do I keep the click event bounded?
var Categories = function() {
$("select[id^='CategoryListBox-']").click(
function() {
SelectedItem = $(this).val();
$(this...
I have a form containing some dynamic elements. These are basically text input boxes that will contain phone numbers with a button to the right to delete the element.
Another button adds a new element and the final one to save it to the database.
What I'm wanting to do is to "mark" numbers that have changed, been removed or new numbers....
Hey there,
I am running a jQuery animation driven splash / web page with (soon to be) hash and hijax driven links and pages. When proceeding through the splash to a specific page, every modern browser is capable of hijaxing links and applying the jQuery rollovers, etc.
However, when going directly to a hashed link from an outside page ...
i want to popup a dialog facebox when i click inside a td in an html table. is this possible ?
http://famspam.com/facebox
...
I have an image in a page that I am trying to get the width of.
<img class="zoomerIcon" src="zoomer.png" />
So I'm trying to get the width like this.
var imageWidth = $('.zoomerIcon').width();
However the value is 0 unless I set the width property in the tag.
Does width() only return a width greater than 0 if it's manually set i...
Hello,
I am learning about jQuery but still very new to Java Script. I'm working on a project which is using slider.js from moving boxes on css-tricks website . I need to be able to loop the slide so that when you get to the last image, it would keep rotating to the first image similar to this http://sorgalla.com/projects/jcarousel/exam...
I have query how to validate form in steps by step, I create a form and it has a three sections in same page,
Personal Info,
Contact info,
Conformation details.
My question is:
If these specific inputs of step1 are all valid and return “true” in #Form, the step-two button will (be activated/take you to the next step) and similarly...
I am retrieving a Google Earth .kml (xml) file and using the content to place markers in Google Maps.
The particular XML tags I am interested in look like:
<Placemark>
<name>Bahamas-LSI</name>
<description><![CDATA[
<img src="http://coralreefwatch.noaa.gov/satellite/ge/data/current/vs_Bahamas_LSI.bmp">
<p>...
How can i detect caps lock key on/off using jquery.... I have a password textbox and i allow only small letters so i dont want caps lock key to be on....
Is it possible to detect the state of Caps Lock Key using jquery?
...
i'm new to drupal , i found that 2 ways to build menu drupal menu module and other one is with drupal jquery menu. i need to know which is best ?and in what basis?. Can any one help me..
...
I have a rating system for a bunch of entries on a website, they are programatically placed in and therefore I have given them a unique form identifier by using a count.
<form name="star">
<input type="radio" class="star" name="rating" id ="rating" value="Terribad"/>
<input type="radio" class="star" name="rating" id ="rating" v...
similar to what is shown here.
I don't need total image editing... only rotation, maybe cropping. But the user being able to drag'n drop a photo and then minor editing is what I'm after. I'm sure there's a jQuery plugin for something like it. (preferably not an HTML5 solution)
However, I've refrained from using uploaders that use an aj...
which one is the best to use for:
images
regular div content
ajax loaded content
forms to post to server
...
Hello,
I am wondering why would iframe work on localhost and not on a webserver online?
<iframe id='i_frame' src=''></iframe>
<script language='javascript' type='text/javascript'>
$(document).ready(fucntion() {
$('#i_button').bind('click',function(){
$('#i_frame').attr({src,url});
});
});
</script
Thanks
Jean
...
I have a situation where I have multiple drop down lists that are hidden or shown depending on the situation. I will always show one of the drop down lists.
So for example, I might have something like this:
<select name="number">
<option value="1">1</option>
<option value="11">11</option>
</select>
<select name="number">
<optio...
I'm trying to have the default behavior of a form select (or highlight) the text when you tab to the next input. I've had to add the .select() function on my password form fields for this to work in IE8. Is there an equivalent to the jquery .select() for deselecting text?
$("#MyTextBox").focus(function() {
$(this)...
Does anyone know how to get jQuery's validator plugin to recognize input field names with special characters?
I have a framework that is generating a form field with these characters: []. Example:
<input type="text" name="user[firstname]" id="user-firstname" />
When using Jorn's plugin, the field is disregarded.
rules: { user[first...
I'm implementing a jquery plugin (localscroll) to smooth scroll to named anchor elements withing a page. localscroll supports an option called 'hash', what it basically does is it appends the named anchor hash into the URL making it easy for the user to bookmark and move using the browser back/forward buttons.
HTML
<ul id="navigation...