jQuery hide div that contains certain text - html

On my website I have 3 types of employees
barista
barista01
security
and I would like to hide the barista01 option but leave the others as they are (please refere to the picture).
When i try to use $("div:contains('barista01')").parent('div').hide(); I get a full black window hiding everything inside.
Is there anyway how to fix this?
Thank you in advanced
enter image description here

If Class name ".hc-mt3" is fixed and will not change then you can target that class.
See Example Code: $("div:contains('barista01')").parent('.hc-mt3').hide();

Related

Auto resize the width of input text area on hidden DIV

I use a Hide/Show .js script that hides some checkboxes and on the right side there is the search field when I click to hide it I want to expand.
Ex.
Before hidding:
Before hidding Image
After hidding I want the search field to be expanded 100%
After hidding Image
I searched for 2 days something and can't find a way to make it expand I use the bTemplate engine to store the HTML code.
Did you try changing the CSS properties through the "setAttribute" method of the elements in question through Javascript? Basically, the code you used to "hide some of the checkboxes" in the first place is pretty much like how you'd write the code to do the other things you're looking to do.
In other words, When you want the checkboxes out of view and the text entry box centered, as in your second reference pic, you could have the Javascript code written through the "setAttribute" method so that when a particular event happens, the css "display" parameter for the check boxes could be set to "hidden", the size of the text entry box can be increased, and the css "position" parameter for the text entry box can be set to have it centered, etc.
That is, of course if I understand your issue correctly. Can you provide the code you are using? I'm sure me or someone else could clarify things more if we could see what you have written.
Hope that helps at least a little! :)

Stylinkg Issue on add more option

I have a registration form on my website, which forms a basic user employment resume. To save space on the page some of the form elements have the option to add more fields, now all of these work fine except for the Employment History section.
When you click on the add more button the form appears directly underneath as it should except for the first four fields:
Job Title
Company Name
From
To
which shift to the left.
I had this issue with all of the add more sections but fixed them as the person who built the page had made some mistakes. However i can not seem to find the issue, It feels like i have changed everything nut nothing makes a difference.
http://goo.gl/w4WYJm
You are missing to add the row class where you generate new elements in your javascript.
<div id='jobtitle"+intTextBox+"'>
should be
<div class="row" id='jobtitle"+intTextBox+"'>
You also have a problem which you will find after fixing this, that the descriptionbox has the row class. Fix this by removing it from the job-description and just apply it to the wrapper div as shown above.
I just checked your website and found the following things.
1) You are trying to show one div#jobtitle1 on clicking add more. I suggest that please add class="row" to that ( this is the class which you people are using for margin )
2) In the same div block which you are showing one more field called Job Description which is again inside a div which has class="row" ( which will again add margin because it is the child div of div#jobtitle ) . Please remove that class here.
Try these things then it will be fine.

onmouseover just on the non-transparent part of the image

I'm stuck with the menu below. All the website needs to be in HTML.
http://hpics.li/740c57f
WHAT: I want to have an hover image for all the different parts when the mouse go on it. (event/brand/website/print/UI/VIDEO)
PROBLEM: The images are overlapping and the mouseover start when i'm on the transparency of the png.
SOLUTIONS I TRIED: Imagemap to detect the zone and then put javascript code inside the AREA. doesn't work.
Imagemap to detect the zone, put an id in the AREA and use a separated JQUERY with .hover(function(). doesn't work.
Use z-index: impossible because there will be always an image that will hide the one under.
QUESTION: If I can't use ImapeMAP to select my zone and use CSS or JQUERY, how can I do ?
Thank you so much for your help!
Might be too late but the exact case can actually be solved by a class I wrote around 3 months ago. It allows you to check whether you're on a transparent area or not and also check for other elements behind the transparent area, this allows to overlap multiple transparent images and correctly jump from one image to another at the correct point.
http://www.cw-internetdienste.de/pixelselection/

How can I place <a> tags over another (greater) <a> tag?

Here's the case: I have a series of thumbnails in a page, and I would like to display several keywords over each image when the user hovers with the cursor. Each of those keywords are anchor tags that point to a search query. And each thumbnail (the image) should also be clickable (through the empty spaces that the keywords leave) and point to a specific page.
I have everything already coded, I'm just missing a way to display the keyword anchors over the image anchors. I already tried with an onclick="window.location.href=..." but when the user clicks the keyword, the onclick is also triggered (for instance: if I ctrl+click on a keyword, i get the keyword search on a different window, but the main window content changes as well).
Any help will be much appreciated. Thanks!
This is quite common and can definitely be done with plain HTML and CSS. You can also do it with JavaScript, but I prefer to avoid doing so if possible.
This example is perfectly valid HTML/CSS and should have no weird browser rendering issues (even as far back as IE 6).
http://jsfiddle.net/2JD76/1/
Basically you have a containing element, in this case a div, which has your linked thumbnail and linked keywords. They're hidden by default and only shown when the containing div is hovered.
The linked thumbnail is absolutely positioned so that it's taken out of the page flow which then allows the linked keywords to appear on top. I then use z-indexes to make sure that the keywords are always on a layer that is higher than that of the linked thumbnail.
You can not. It is illegal html.
Attach a click handler that changes the current location instead of the "greater ".
I was going to answer with a long reply but, well check out my Jsfiddle here. I was trying to solve something before and well...check it out.
http://jsfiddle.net/somdow/KSt6a/
If you look at the code, its doing exactly what you are describing.
On my Jsfiddle, theres a div box with space for an image(this is wher YOUR image would go), The image is on the code but not on the jsfiddle so youll see the alt tag....Anyways so, on mouse-over, it brings up another div with text dynamically created inside of it.
All you have to do is replace the image content with your own image, then Insert the links/keywords links you want into this line
.prepend('<div class="portSecRollOver"><div class="portSecInner"></div></div>');
and stick your words in between the <div class="portSecInner"> **YOUR WORDS HERE** </div> line
And change the CSS to fit your needs.
oh AND ps, DELETE this line (below) which is the one that dynamically appends text inside of "portSecInner", since your going to insert your own words, then you dont need this line.
$(this).find('.portSecInner').html("<h3 class='h34roll'>" + $(this).find('img').attr("alt") + "</h3>");

Custom ComboBox with Horizontal line in DropDown

I want to create a Custom ComboBox in which the DropDown contains the Horizontal Line or you can say HRule immediate after the First Item. here I am providing you the image For that you can see i have used paint to draw the HRule i want component similar like that. Please provide me valuable Links or code for that. Here is the Image.
Thanks in Advance
Have # nice Day...
Here is your answer : How to add a separator to your ComboBox