Info:
I've added a button on my homepage, which triggers a div to expand. The div shows 3 different filters, which you can choose.
The problem is:
After choosing the first filter, the div closes again. To choose the 2nd and 3rd filter, you got to press the button again to expand the div. And the problem happens again when clicking on the 2nd filter.
Question:
How can I prevent closing of my div, while choosing filters?
My code:
$(document).ready(function() {
if($(window).width()<768) $("#button-opl").on('click',function(){
$("#views-exposed-form-attraktioner-block").slideToggle();
});
});
Related
As the title suggests, I've found the ClassName of the button I want to click (I think, because the innertext on that ClassName array # gives me the correct text shown on button). Problem is, I'm clicking it but it does nothing.
This is my best attempt, among dozens, but it's not doing anything.
For Each i In IE.document.getElementById("typeSelector")
If i.innerText = "Revenue" Then
i.Click
i.FireEvent ("onchange")
'This click and fireEvent are activated but do nothing.
End If
Next i
'These next ones are Hail Mary's stacked on top of each other to see if I get a reaction out of that damn box. Nada.
Debug.Print IE.document.getElementsByClassName("chzn-single chzn-default")(0).innerText 'Prints "Select an option". I thought clicking this would at least open the drop down menu but still, nothing.
Debug.Print IE.document.getElementById("typeSelector_chzn_o_14").innerText 'Prints "Revenue". This is the option within the dropdown menu, shown after clicking the menu when manually done.
IE.document.getElementsByClassName("chzn-single chzn-default")(0).Click
IE.document.getElementById("typeSelector_chzn_o_14").Click
To summarize, I've tried activating the option based on index, clicking the box, clicking the box then clicking the "Revenue" option. The website remains completely unmoved. Should be noted that a succesful click would not update the website, simply highlight the "Revenue" option in the menu, and open up a Date input box.
In the body there is one button, on click of which a modal window pops up. There are 2 xdsoft_datetimepickers in the modal-dialog. The last datetimepicker opens beyond the screen and the last few rows in the calendar are not visible.
The calendar opens up on click of the the input field to which it is associated in the modal-dialog.
On adding overflow-y:auto to body.modal-open we can scroll down to see the calendar.
The inbuilt property of the datepicker is it will appear below the input field if there is enough space otherwise above it.
But in my case it always appears below the input field thereby, hiding the last few rows.
You can set the "pickerPosition" option value is 'top-right',code is
$('#datetimepicker').datetimepicker({
#this is other option
...
pickerPosition: 'top-right',
});
I am trying to toggle a table column by providing a button in the header of every column, when user clicks on the button that specific column should be hidden and when user clicks it again it should open. But my problem is as i am hiding the whole column when user clicks on the button in the header user is not able to see the button. Can anyone suggest me how this can be achieved using jquery?
You can see the image as below
Thanks,
Praveen.
Table column hide or display
The best solution to the problem is place your button in th
jquery
$(document).ready(function() {
$('#btnHide').click(function() {
$('td:nth-child(1)').toggle();
});
});
Check out second case
Solved Checkout
I have Four DIVs and I call accordion function to it. It works fine initially. But it fails after I clear all the content and again append the FOUR DIVs.
Kindly take a look at the link
http://jsfiddle.net/p7vUk/2/
You will see that on clicking divA , divAA will slide toggle.
on clicking divB, divBB will slide toggle.
After you click the 'clear all' Button, the div=content is cleared and same four DIVS are appended, but the jquery accordion fails to work.
The accordion styling and behaviour is defined upon creation. Looks like the accordion does not update when the content changes. Nor does there appear to be a method you can call to trigger an update.
Have you tried 'turning it off and on again'?
//change content, then:
$("#content").accordion("destroy");
$("#content").accordion({ ... your options ... }); //create it again
This may require more related work, such as setting the originally selected tab, etc.
I have a div which hides a select box. When a user clicks on the div it disappears and shows the select box. Then when the user clicks away from the select i want the div to show again and essentially cover it up.
so, to hide the div I have the following:
onclick="document.getElementById(\'infoi'.$div_i.'\').style.display = \'none\';"
When the user has touched the select and clicks away I have the following which covers the select again:
<select name="g_name" onchange="this.form.submit();" onblur="document.getElementById(\'infoi'.$div_i.'\').style.display = \'block\';" style=width:170px;>
for this to work as i want it to though, the user has to actually click the select, even without selecting anything, for it to gain focus and therefore the onblur will turn the div back on.
So, I try the following to hide the div and set the focus on the select:
onclick="document.getElementById(\'infoi'.$div_i.'\').style.display = \'none\'; document.getElementById(\'g_name\').focus();"
Bit it simply does not work, any ideas?
I have a working example of what I think you are after here http://jsfiddle.net/Znct3/10/
looking at your code you were applying focus to an element with an ID of g_name but your select only has a name of g_name