I have a recursive function that renders divs as shown below. I have
been researching and have not found a good way to accomplish the toggle
method. I would like to be able to have the click method fire on only a
single element. IE: Only fire when i click on Administration, not when
i click on anything within administration. Then at this point all i am
really trying to do is click on a level 1, fire the toggle method to
just show/hide whats nested inside that element. I would love to be
able to do the same for .lvl2, and lvl3
Any ideas on the proper selector for click and the proper way to
only select immediate (first level nested) elements, but not their
children would be great. Thanks! PS, willing to change how my HTML
is rendered if it can accomplish this easier.
I have the code below looping through 2 text fields with PhoneNumber
class. I have tried multiple RegEx strings to validate that the
user inputs xxx-xxx-xxxx
(using jquery 1.7.1.min) - no console errors
No matter what i try, i still can't get them to match the
regEx string. I know there is some javascript, but i hope with
the amount of jQuery i am using that i can post this here. Is
there something simple I am missing or is my concept wrong or
do i just keep using incorrect regEx strings? Any help
would be much appreciated.
Thanks,
Eric
JS
var phoneExpression = new RegExp("\d{3}-\d{3}-\d{4}");
$('.PhoneNumber').each(function () {
if
(phoneExpression.test($(this).val()) == false) {
$(this).addClass('MissingData').addClass('HelpTip').prop('title','Format
number as xxx-xxx-xxxx');
I am currently using UI-Tabs with Redmound style theme. One page only has 3 tabs. I would like to add a icon<link> to the tab bar and float it in the top right corner. Is there any easy way accomplish this. I am not extremely experienced with the css behind the tabs. i would rather not just add another tab with this icon on it.