1 2 3 4 5 6 7 8 |
<strong>JQuery</strong> is a Javascript Framework used in most of www websites. Providing easing effects, code manipulation, easy <strong>ellement <a href="http://api.jquery.com/category/selectors/" target="_blank">selectors</a></strong> and some other great stuff! Personally is my favourite framework and i use it in most of my "web coding" cases. I've been looking for <strong>wildcard</strong> ellement selection in <strong>JQuery</strong> framework and finally i've realized that <a href="http://jquery.com/" target="_blank">JQuery</a> uses <a href="http://en.wikipedia.org/wiki/Regular_expression" target="_blank"><strong>regular expressions</strong></a> in DOM (Document Object model). <kbd>For example</kbd> <kbd></kbd> [crayon-676923ac2890b715124467 lang="js" ]$("#divEllement").html(); |
So for wildcards this can be done.
1 |
$("#Ellem\\S*").each(); |
Update: I’ve discovered that is not usable in some cases. In case you are really in trouble, you can use
1 |
$('div[id^=Ellement]:visible').something |
This will work in any of these “Ellement1″,”Ellement2″,”EllementSomething” cases.[/crayon]
1 2 |
PS If anyone has a better way for this, don't hesistate to mail me. |