Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
If i click a division it will slidUp and if i click that division again it will slideDown.
How can i do this ?
$("#id_color_tags").click(function(){
$("#rightsidefive").slideToggle();
})
Tried that but that didn't work.
Put an alert in the click event, are you getting to the function?
Are the names right. asp.net can alter names so maybe select on a class name instead. So <div class="thisclass"> and the selector then becomes ".thisclass"
Same applies for the #rightsidediv
Failing that, post some HTML so we can see.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to know if there is a way to remove a class when that class is marked with display: none;. Basically, I would like to prevent it from loading.
Is it possible to do it using JQuery?
Thanks in advance!
$('.class-you-want-to-remove:hidden').removeClass('class-you-want-to-remove');
https://api.jquery.com/hidden-selector/
You can use hide() method in jQuery to hide the blocks under that class.
$(".classname").hide();
Similarly you use show() method to show the blocks under that class.
$(".classname").show();
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
well i was planning to do something like this:
http://www.bluefountainmedia.com/portfolio
That every time you click on the image, the div below will show, and if im going to click other images, it'll toggle back up, then open the next portfolio with the same div but different images and descriptions on the side.
Note: they have the same div, just calling out different items.
Thank you.
Actually if you look at the console, they are calling different divs. You could probably get it done quickly using jQuery .slideUp() / .slideDown().
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
in the link below in the bottom of page we see some box that aligned with the javascript or jquery,and they are not in the same row. this can't be done with css.
and when the page width change they realigned with smomth animation.
any body know how to do that? is there any video to teach this technic?
http://esam.ir/itemView.aspx/562755/%D9%81%D8%B1%D9%88%D8%B4-%DA%AF%DB%8C%D8%AA%D8%A7%D8%B1-%DA%A9%D9%84%D8%A7%D8%B3%DB%8C%DA%A9-%D8%A7%DB%8C%D8%B1%D8%A7%D9%86%DB%8C.htm
thanks
There is an easy library called Masonry, have a look at that, they have some decent documentation and it works exactly like you want it. But going into the details of how its done is beyond the scope of a stack overflow post.
http://masonry.desandro.com
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a CoffeeScript code that looks like this:
if $('#user_address_attributes_country').val() == ""
$('#user_address_attributes_country').val("PL")
Now I want to do the same thing for a few divs but without repetitions.
How can it be done by jQuery?
The reason you can't apply it multiple times is because your trying to apply it to an element which has an id. They are unique. Use classes and do this instead:
if ($('.user_address_attributes_country').val("")) {
$('.user_address_attributes_country').val("PL");
}
Simple demo: JsFiddle
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to do is make those buttons with class btnd that are not disable not clickable to the users.
current output: http://jsfiddle.net/6VrXD/44/
If you mean you want the clicking to cause nothing you could use...
$('.btnd:not(disabled)').on('click', function(e) {
e.preventDefault();
});
I have no idea if this would cause what you want thought as it's not at all clear what you actually are looking for and more importantly why.
The buttons already do not do anything since there is no event attached. To give the front-end visual feedback I would suggest changing the cursor to the default.
.btnd {
cursor: default;
}