开发者

input type="text" not clickable in a jcarousel (jQuery based carousel) element

I work on a website where almost all objects are in a jCarousel element :

<div>
  <ul id="mycarousel">
    <li>object 1</li>
    <li>object 2</li>
  </ul>
</div>

is the "written" code, and :

<div class=" jcarousel-skin-tango">
    <div class="jcarousel-container jcarousel-container-horizontal" style="display: block;">
        <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"></div>
        <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"></div>
        <div class="jcarousel-clip jcarousel-clip-horizonta开发者_如何学Pythonl">
            <ul class="  jcarousel-list jcarousel-list-horizontal" id="mycarousel" style="width: 2853px; left: 0px;">   
                <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal" jcarouselindex="1" style="width: 307px;">
                    object 1
                </li>
                <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal" jcarouselindex="1" style="width: 307px;">
                    object 2
                </li>
            </ul>
        </div>
    </div>

is the generated code (here it lacks the ultimate </div>, maybe a number of rows limitation ?).

I'm sorry I can't provide a link, I work on a local server currently.

It works perfectly =) but...

my problem is : an <input type="text" /> won't be clickable in this environment. I tried the others type of input, radio, checkbox, file : works. But text does not.

I can specify a value on my input (it's its purpose on my work : a search in a database for datas to be modified and reinjected in database).

In fact, I can access to the text input by clicking-right in then left. But it's pretty 'unergonomic', and in my project it's unthinkable.

Ah, and I tried to style this input with a style="z-index:1000;", no changes, I think it's not a CSS problem.

Does anybody have an idea ?

Thank you very much in advance.


Ok, I managed to solve my problem. Or, more precisely, to bypass it. I think a text input would involve text selection, and it's impossible in my carousel ("click, keep clicked and move" launch the carousel next and prev action.

So I cheated :) I called a hidden div with jQuery.show(), I positionned it (CSS, my love) and filled it with jQuery.html()... It works, and it pretends to be part of the carousel - of course, it doesn't move but I wanted to display one element at a time, so, it meets my requirements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜