Hi Guys,
I have a very simple toggleClass that changes the appearance of a link when clicked on. Works great apart from one thing. Every time I click the link, the browser focus shifts right back to the top of the page. This gets quite annoying if a link is at the very bottom of a page.
I could use another element such as span of coars...
Hi. I want to know how to correctly write an if statement with jquery. I have a bunch of div's with an anchor in each that when clicked expands the the div's width using toggleClass. This works fine but I want to write an if statement that checks to see if the other div's have the same class applied, if so contract that div, then expand ...
Hi
I am using playing around with the Pretty-checkboxes-plugin and have a problem.
The plugin can be seen here http://aaronweyenberg.com/90/pretty-checkboxes-with-jquery
As you can see, this uses two links to select and deselect. I want it to only use one link and then change the class to make it work the other way the next time it is c...
I am trying to create a function to change the class on a series of 5 list elements depending on which has been clicked. The goal is to change the style of the element depending on which one is the current element.
I had tried something like this:
function addClass(obj)
{
obj.className="highlight";
}
and then added this to my elemen...
Ok I have a inline list of buttons.
<ul id="nav">
<li class="home"><a href="#">Menu Item</a></li>
<li class="contact"><a href="#">Menu Item</a></li>
<li class="about"><a href="#">Menu Item</a></li>
</ul>
.home{
position:absolute;
bottom:0;
background-image:url(../img/menu/single_line.png);
background-repeat:no-repeat;
height...
I have a set of 5 checkboxes with class set to "child". I want that if I select one checkbox, rest of them goes disabled. I have tried following code but it disables the all checkboxes.
if ( !$(this).is ( ":checked" ) ) {
$(this).removeClass().addClass("hand .parent");
$(".child").attr ( "disabled" , true );
}
then even i tried ad...
With help from the community last week, I successfully implemented this code here
Now i need to do something similar but now compare html text with [title]. My code so far is below:
$(document).ready(function() {
$(".views-field-field-success-stories-image-data .field-content").click(function() {
var sharedata = $(this).text();
...
So, I will explain a bit further.
I have a table with different cells. What I need to do is that when the user clicks on the cell, that cell would change its class and highlight. That is working perfect.
The thing is I need is to unhighlight that cell if another cell is clicked.
All cells has the "unselected" class by default. When cl...
I am using slide out panel that on default is set to display:none. If the trigger is clicked it will toggle the class to "active". That makes the trigger show a red x (for close) that comes from a sprite position.
$(document).ready(function(){
$(".info-panel-left-trigger").click(function(){
$("#info-panel-left").toggle(400);//switching...
Hello...I am attempting to create a dynamic favorites list in this application i'm working on. My problem at the moment is I cannot direct an event to toggle specific li class names. I have a large list of li's and seperate pages associated with them. Each page has a title bar with several image links, phone number, etc. the last image i...
hi all, I am trying to add a class to my tr rows if the select all checkbox has been selected, but I can't seem to get the add class to work (and then obviously remove them if check all has been deselected), I am using toggle on each individual row to add/remove the class, but can't seem to get it working for the check all.
Here's my ta...
Good day all,
A series of differently sized images are each individually wrapped in left floating differently sized divs on a horizontally scrolling web page. I want to be able to tap on a div to scale it to fullscreen, (by adding a css class containing the scale instruction, with toggleClass), and tap on the image (which is now fullscr...