here is an HTML structure I can't change: I successfully attached a click event handler for those li's, like so: $(document).on("click", "#menu li.top-level", function (e) { // whatever code }); However, I don't want the clicks on li's
Here is my code: $('.click').on('click', function(){ $(this).next('div').toggle(100); }); .click{ cursor: pointer; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https:/
I want to trigger an event of the parent class by clicking a button or image. <li class="addImage"> <input class="PhotoPicker" type="file" accept="image/*" capture="camera" onchange="angular.
I want to hide all elements except for an element with a specific class AND all elements inside this. right now im using $("body").not(".embedded").hide(); But it also hides the elements inside my .embedded element. I appreciate every
I was wondering how to remove empty elements, but allow only one empty element per group (next to non-empty one) ? Something like : Example HTML : <p>Hello world</p> <p><br></p> <p><br></p> <!--This will
Sorry for what is probably an easy question, but I haven't found a way to make this work yet. I'm new to JQuery and I've got some nested lists which I'm trying to add a click event to a parent list which will slideToggle the children lists, which I'v
I spent quite a bit of time trying to come up with this today to no avail. I'm trying to select rows in a table having visible input elements but excluding the row that contains the input with focus. My best guesses: $('tr:has(input:visible)').not('t
I'm trying to select a control in order to manipulate it but I'm having a problem: I can't select it. Maybe it's because the xml structure, but I really can't change it because it is externally created. SO I have this: <span class="xforms-value xf
How to select ubuntu from the following drop down box <select><option value=""></option> <option value="" selected="selected">Select Image</option> <option value="3f2cb990-cd0e-4bfa-a23e-
<div id="slide2" class="slide" style="z-index:2;"> <div style="display:none; z-index:1;position:absolute; bottom:10px;right:10px;padding:20px; background:#fff;border:solid 1px black;border-radius:15px;box-shadow
I do have a script which selects all the tags under a particular element, it also exclude script tags. So right now its as follows. $(myElement).find("*:not(script)").each(function(){ But I need to exclude an element and its children. I am not s
Trying to change the color on all the paths in an svg group except one path that has been given the class "static". I have tried both of the following: $('.groupClass').children().not('.static').css('fill', '#FF0') In this case, the not selector
I am curious based on jQuery's Bottom up or Right to Left query selecting. How could this selector below be improved? Not the actual keydown event but the .undo and .save portion of the code? <div id="dnsTitle" class="account accountTitl
Let's suppose that we have the following markup: <div class="t-shirt black blue">Example</div> <div class="t-shirt white blue">Example</div> <div class="sweater black blue">Example</div> &l
I have this fiddle link. In this you can see my markup is just like bunch of li inside ul. In this I have made 3 lis as one row and another next 3 lis as another row and so on. Now I have used jQuery to take the height of one li which height is the m
EDIT: Skip to end for a better explanation of what I'm after, thx I have approximately the following html (this just an excerpt) where there is a nested organisation of chapters: <span class="chapter Art" id="00034"> <li>&l
Lets say i have a full source string of html page (in PHP), like: <?php $html_source = ' <html> <head> </head> <body> <div class="class1">Hello!</div> <div class="class2">World</div> &
I want to select the following three values from the HTML file either by Jquery or Javascript. class "class1" href value class "class1" inner text value (PersonA in the example code) class "Title" inner text value (Accountant
I have a following structered DOM result, getting after a POST event: <root> <config> // Some inner tree </config> <test> <test testValue="0"> <id>90</id> <time>false</time> <config> &l
I'm trying to get an alert to appear if two conditions are met: The value of the display property on the #playerbox element is block, AND The value of the display property on the #playerinfo element is none I have this: if ($("#playerbox").css(&
Ideally I would like to be able to make the event target all p.hiddeninput, which do not also have the specific ("." + this.id + "Y") class, within the parent div of the radio buttons. I have tried using the .parent() selector without
I have some jQuery function: rfx.jQuery(function(){ rfx.jQuery(".form-row.errors").blur(some_function(this)) }); But 'this' is HTMLDocument and not a list of selector return values. How can I get reference to list of elements?The result of the s
I'd like the count the element on the page with the name : MyElement_1 MyElement_2 Then I'd like get element MyElement Thanks, var elements = $('[name^=MyElement]'); var length = elements.length; If you want some more advanced filtering, you can filt
var prev = b - 1; var previousImage = $('.header ul.active').find($('li[rel=prev]')); The 1st variable is an integer being deducted by 1. The next variable named previousImage is what i'm having trouble with. Each one of the lis within the previousIm
I have a HTML select like this: <select name="something"> <option value="a">1</option> <option value="b">2</option> <option value="c">3</option> </select> and I've not
Question 1 I've just started learning jQuery and one thing that puzzles me is function() with a parameter in it, ie: function(e). [Example 1] $("#rating a").click(function(e){ // stop normal link click e.preventDefault(); } What is e in function
Is there a way by which you can use multiple selectors with common tag name. So like, here i have $('span.clone1, span.clone2, span.clone3') i just want to make it common. ThanksHere's one way: var myclasses = [ '.clone1', '.clone2', '.clone3', '.som
Heys! Ill cut right to the subject, here's the jquery code: jQuery(function() { jQuery('.entry-content h1').nextUntil('h1').hide().prev().click(function () { jQuery(this).nextUntil('h1').slideToggle(); });}); here's the html: <div class="entry-con
I want to make a selection in jquery using nth child selector I have the index number as a variable suggestions; but $('.search_filter:nth-child('+suggestions+')').focus(); does not focus the 2 element if suggestions=1 so please tell me what I am doi
hallo all. i am trieng to build a function that gets all ul's on screen that have less then 3 li elements. i need this as a jquery object. so i dont mind if it will be a function or just one selector. how do i do it? thanksYou can use .filter() for t