Skip to main content

All Questions

Tagged with
89 votes
3 answers
87k views

CSS selector for targeting only immediate children and not other identical descendants

I have a nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be the ...
VirtuosiMedia's user avatar
8 votes
4 answers
402 views

Is there a way to search for attributes that start with a certain string in HTML

Is there a way to find all the elements with attributes that start with a particular string? I am using Mootools framework and this is what I have tried: $$('*[data-media-*]'); But it just outputs ...
jnbdz's user avatar
  • 4,913
6 votes
2 answers
2k views

Slick vs. Sizzle -- Pros and Cons of CSS selector engines

When would I want to use Slick and when would I want to use Sizzle? What are the pros and cons of each as a standalone CSS selector engine? How easily can Slick be used with JQuery? Can Sizzle be ...
GoalBased's user avatar
  • 1,810
4 votes
2 answers
3k views

Getting all visible elements using MooTools

I am moving from jQuery to MooTools (for the fun..) and I have this line of code : $subMenus = $headMenu.find('li ul.sub_menu:visible'); How I can write this in mootools? I know that I can use ...
Yosi's user avatar
  • 2,956
3 votes
1 answer
1k views

mootools css multiple attributes

I am trying to match in Mootools [version 1.11] a multiple CSS attribute as in this element: <input type="radio" value="dev" name="radio_server"> I would like to match this element that has ...
dawez's user avatar
  • 2,714
2 votes
3 answers
6k views

How to get a collection of input elements by name attribute

I've got a form which looks like that: <form method="post" enctype="multipart/form-data" onsubmit="return new_post_form_submit();"> <input type="hidden" name="task" value="addPost"> ...
Piotr Salaciak's user avatar
2 votes
2 answers
2k views

MooTools: Attaching event to multiple elements

I've got a jQuery routine I need to convert to MooTools, but I can't get it to work. Here's my jQuery version: $(".google-analytics-link").click(function () { var href = $(this).attr("href"); ...
foobarbarfoo's user avatar
2 votes
1 answer
941 views

Remove CSS selectors and it's related properties if needed

I am trying to remove specific CSS selectors, and if there is no more selectors for a list of properties than the script removes it... I was able to get a part of the script working: http://jsfiddle....
jnbdz's user avatar
  • 4,913
1 vote
3 answers
3k views

Make Javascript variable global w/ MooTools

I'm using mootools-1.2.3 at the moment and I'm having trouble getting a variable to be accessible outside of a function. I need to define the variable in the domready function, because otherwise the ...
zanbaldwin's user avatar
  • 1,009
1 vote
1 answer
702 views

selecting pseudo-elements with mootools

Using MooTools,is it possible to select elements generated using the css pseudo-selectors ':before' and ':after'? Specifically, I'm defining the element below, and trying to adjust its height with ...
sslepian's user avatar
  • 1,911
1 vote
2 answers
10k views

Mootools - selecting a DOM element by its classes

I use MooTools, and I need to find the element which has both classes "a" and "b" (the innermost div in my example below). The HTML structure is: <div class="a"> <div class="otherclass"&...
Nir's user avatar
  • 3,993
1 vote
1 answer
157 views

How to find an element using CSS2 Selector in Motoools and hide it?

How can i find this span element with class="rocon.rocon-br" in #conttile2 by Mootools' Css Selector? This element is created dynamically by Javascript (rounded corner), so this is what i see in ...
moogeek's user avatar
  • 427
0 votes
1 answer
5k views

How to trigger an event in Mootools for a specific tag/element with a specific element ID?

How to trigger an event in Mootools for a specific tag/element with a specific element ID? I have this: <a href="youtube-clip...etc" rel="rokbox" id="video_popup" style="display: none;">Video&...
user avatar
0 votes
1 answer
2k views

Mootools wildcard selector

How can I select all elements whose IDs start with "row_", for example "row_223425" and "row_at264" etc.? What I am ultimately trying to do is give a background colour to each even .productWrapper ...
Psyspi's user avatar
  • 3
0 votes
2 answers
12k views

Mootools - Targeting child elements with an .each selector

I'm trying to target a UL that's inside a LI and I'm having trouble. Here's the HTML: <ul id="main_nav"> <li class="main"><a href="#">Section 1</a> <ul id="dropdown"&...
user avatar

15 30 50 per page