K
K
Karpkarp2016-07-22 18:17:32
JavaScript
Karpkarp, 2016-07-22 18:17:32

Wordpress slider?

Hello, I installed the Smart Slider plugin on WordPress. I uploaded pictures, set everything up as needed, I get the code, and wherever I put it, the page design breaks, namely, the second side scroll bar appears.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
Roman Makarov, 2016-02-23
@rmakarov

alphaArr = [];
countries.forEach(function (country) {
    //any logic
    alphaArr.push(country[name]);
});

S
Serge K, 2016-02-23
@korotkin

For example like this:

var res = countries.map(function(o){
return o['alpha-2']
})

Or so, the order will change:
var i = countries.length,
res = [];

while(i--){
  res.push(countries[i]['alpha-2']);
}

A
Aves, 2016-02-23
@Aves

function getNames() {
  var alpha2Array = Array.apply(null, arguments);
  return countries.reduce((s, e) => {
    if (~alpha2Array.indexOf(e['alpha-2'])) s.push(e.name);
    return s;
  }, []);
}

console.log(getNames('AX', 'AF'));
console.log(getNames.apply(null, ['AX', 'AF']));

_
_ _, 2016-02-24
@AMar4enko

"One-liner" for lodash

_(countries)
  .filter({'alpha-2': 'AF'})
  .pluck('name').value();

_(countries)
  .filter(country => alphas.indexOf(country['alpha-2']) > -1)
  .pluck('name').value();

Ярослав Александров, 2016-07-22
@alexyarik

https://wordpress.org/plugins/ml-slider/ поставьте метаслайдер, у меня с ним проблем не было

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question