Problem with Jquery effect . Blur() in IE8

Asked

Viewed 460 times

4

I have a method of building dynamic elements using jQuery v1.2 with Ajax, which creates a list of items containing the structure of <ul> and <li>, however, when I apply .blur() and Ajax returns many values, a scroll bar is created. In IE8 when I click the scroll bar the .blur() is triggered.

In other browsers works smoothly, however, only on IE8 I have this problem.

Here’s a cipher I created in codePen: Codepen

I preferred Codepen because I could not use Jsfiddle.

  • 4

    If you run your code in Jsfiddle using a more current version of jQuery the problem still happens?

  • 1

    I’d like to see the code in question for testing

  • The code in the Codepen http://codepen.io/CleberOtaviano/pen/gyrhJ

  • When I click on the options/suggestions scrollbar Blur() is fired on all browsers. And that makes sense since I click off the input element. That’s what you want to avoid?

  • Sergio, what you said makes perfect sense, thinking about what you said, I changed it. Blur() for a check, if where it was clicked was different from the list then performs the "None display" of the list. Thank you very much. The following is amended by Codepen: http://goo.gl/j14Iho

1 answer

1

 <script>
 window.onload = function blur(){
   var name = document.getElementById('idname');
   var name2 = document.getElementById('idname2');

 name.addEventistener('click', function(){
    name2.style.msFilter = "blur(XXpx)"
 });
 }
 </script>

EXPLANATION: In var name Voce defines the element you want through the ID. in var name2 Voce defines another. when you click on the name the name2 will look like the Blur filter.

  • Could you give a brief summary of what your code does?

  • In var name Voce defines the element you want through the ID. in var name2 Voce defines another. when you click on the name the name2 will look like the Blur filter.

  • 1

    Edit your reply with that comment. (:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.