This is my template for my slide item (made up data):
<div>
<div class="previewImage">
<img src="myimage.png" alt="myImage" />
</div>
<div class="summary">
<span class="desc">desc</span>
<span class="count">12345</span>
</div>
</div>
This template gets repeated 325 times and initialised into a slick.js component:
$("#slider").slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite: false,
touchMove: false
});
This hangs up Chrome / FF / IE for about 2 seconds and sometimes might even give a "This page is freezing your browser -> Kill or Wait" (paraphrased) notification.
I have tried lazyLoading but it did not make that much of a difference (if any... definitely not conceivable difference). I went through slick.js website / documentation and can't see anything else that might help.
Is there anything I can do here or am I simply using the component beyond its specs?
Any ideas welcome.
Change the src to data-lazy . With src, lazyload doesn't work with Slick.
Related
After wasting like 2 days with this problem i finally decided to post this here and hope someone can help me. I work with "iCheck" (http://icheck.fronteed.com/) but also tried similar libraries that work roughly the same way. I try to achieve fancy checkboxes in form of a button - a pretty common thing i guess.
Now with iCheck and the other libraries i tested i always have one problem: I build my code to send an AjaxRequest to work with the data provided in a form and then reset the form. That works pretty neat, except for these chechboxes. If i change them to the other state they are not initialized with (like from FALSE to TRUE) and reset the form the button visually stays on that state until you click it once again. I works like it should with "normal" checkboxes.
I rebuild a small testpage and put it into jsfiddle. Is this a bug or am i totally overseeing something there? Can someone explain to me why that happens and how to engage with this?
HTML:
<form id="form">
<input type="checkbox" class="check_test" name="test" value="1"><label>Checkbox 1</label>
<input type="checkbox" name="test2" value="1"><label>Checkbox 1</label>
<br/>
<button type="reset" onClick="this.form.reset"> Reset </button>
</form>
Javascript:
$(document).ready(function(){
$('.check_test').each(function(){
var self = $(this),
label = self.next(),
label_text = label.text();
label.remove();
self.iCheck({
checkboxClass: 'icheckbox_line-blue',
radioClass: 'iradio_line-blue',
insert: '<div class="icheck_line-icon"></div>' + label_text
});
});
});
https://jsfiddle.net/p80dctkv
Thank you in advance.
You can add js like this to remove checked ichek
$(":radio").prop('checked', false).parent().removeClass('checked');
I've been trying hard for the few past hours, but I can't make it work.
My objective is to put an animation on element1's ::before and another one on element1. I tried the simple CSS trick with the ::before and :hover thingy.. but it won't work.
HTML
<div id="fc3"><div class="f_bb">Hover this</div>
<div class="f_bloc">This should appear with an animation</div></div>
CSS
/can't put it here without bugging it, dunno why/
JS
/same/
https://jsfiddle.net/5Lf76r7h/
Any idea ?
Thanks. :)
UPDATE
Full CSS attempt : https://jsfiddle.net/5Lf76r7h/3/
UPDATE 2
https://jsfiddle.net/5Lf76r7h/4/
I have used jQuery animate with mouseenter and mouseleave to achieve the same. Please see this fiddle:
https://jsfiddle.net/rawatdeepesh/2f41k6m5/
Here is the code for your design:
<div id="fc3">
<div class="f_bb">Hover this
<div class="progress" style="border:1px blue solid;width:10px;height:5px;background-color:yellow;display:none">
</div>
<div class="f_bloc" style="display:none">This should appear with an animation</div>
</div>
</div>
In case you need more on animations: http://www.w3schools.com/jquery/jquery_animate.asp
I have been stuck in a problem since couple of days.
I am trying to get the UIKIT Modal on the top of another UIKIT modal.
I have an EditModal and SubEditModal as follows:
<div id="modalEdit" class="uk-modal">
<div class="uk-modal-dialog uk-animation-scale-up">
<div class="modalTitle"><h1>Edit</h1></div>
<a class="uk-modal-close uk-close"></a>
</div>
</div>
<div id="modalSubEdit" class="uk-modal">
<div class="uk-modal-dialog uk-animation-scale-up">
<div class="modalTitle"><h1>Edit</h1></div>
<a class="uk-modal-close uk-close"></a>
</div>
</div>
I have address listing in modalEdit. When the user clicks on edit in one of address, I use the modalSubEdit to display the edit form. This should be displayed on the top of modalEdit. I wrote the following jquery:
$.get(url, function (data) {
var container = $('#modalEdit .uk-modal-dialog');
var targetDiv = $('#modalSubEdit .uk-modal-dialog');
targetDiv.empty();
targetDiv.append(data);
container.add(targetDiv);
});
The problem is as soon as the modalSubEdit is displayed, modalEdit closes itself. When I dig deep into it, I found that, as soon as modalSubEdit is displayed, the display property of modalEdit is set to none.
I would be very much thankful if someone could come up with some suggestions or solutions.
Also thanks to the viewers for their time.
Per the docs, this should be enough to run Twitter Bootstrap:
<div class="carousel">
<div class="carousel-inner">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</div>
$('.carousel').carousel()
I also included jquery.transitions plugin so I assumed it would degrade in older browsers.
Unfortunately, the slides don't move at all in Firefox 3.6. Why?
It looks like you need to add slide class to your carousel for the simple version to work:
<div class="carousel slide">
Sample carousel has it, and there is a check in the code:
if (!$.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger('slide')
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
Kind of strange they didn't mention it, though.
I have tried everything but no luck. I am using Watin and C# .NET
What I am doing is going to:
https ://adwords.google.com/o/Targeting/Explorer?__u=1000000000&__c=1000000000&ideaRequestType=KEYWORD_IDEAS#search.none
Note: There's no space between https and ://, but I had to add it because of a markdown problem
Entering the captcha manually (typing the text from Watin).
After you search for keywords, you will see that in the bottom of the page you have a Next and a Previous button.
I would like from WatiN to go to page 2, 3,...
It sounds simple, click on the div (with id gwt-debug-aw-paging-next ) and it will go to next page, but it does not happen.
I tried FireEvent, click, KeyDown, everything ... but it's not working.
I also tried to select 100 results from the Selectlist, but again, it does not work.
I tried it in all ways:
browser.DomContainer.SelectList("gwt-debug-aw-paging-list-box").Option("100").Select();
Nothing seems to work when talking about the buttons from the bottom right of the page.
I managed to "simulate" the click on Broad or Exact results, but not with the bottom buttons.
Any suggestions?
Edit 1:
I uploaded an image so you can see exactly the button I am talking about:
Click here to view it larger.
<div id="gwt-debug-aw-paging-next" class="goog-button-base goog-inline-block goog-button aw-btn aw-pagination-button" tabindex="0" title="Next page">
<input type="text" tabindex="-1" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;">
<div class="goog-button-base-outer-box goog-inline-block">
<div class="goog-button-base-inner-box goog-inline-block">
<div class="goog-button-base-pos">
<div class="goog-button-base-top-shadow"> </div>
<div class="goog-button-base-content">
<span id="gwt-debug-aw-paging-next-content" class="aw-pagination-next"> </span>
</div>
</div>
</div>
</div>
Please paste the markup of the element you would like to click, including a parent element or two.
This will help in suggesting solutions.
Thanks.
So the following does not work?
using(IE ie = new IE("your-page's-url"))
{
// ... any steps needed to bring up the page in question ...
ie.Element("gwt-debug-aw-paging-next").Click();
}
If not, maybe try clicking on the span gwt-debug-aw-paging-next-content.
I managed to solve the problem. Another programmer gave me this tip, so the credits go to him.
The idea is that there are more spans with the same ID in google adwords (strange, I know), so what we need to do is click on every span, not only at the first span.
Here is the final code that needs to be added:
var pagination = browser.Spans.Where(e =>
e.IdOrName == "gwt-debug-aw-paging-next-content").ToList();
foreach (var item in pagination)
item.Click();