Explore the community Forums Lectora Lectora Suggestions Make Lectora more developer friendly.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #314061 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Tim, I’m not getting the same thing as you. Are you sure you’re not accidentally providing the same ID to more than one DIV? See attached.

    #314188 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    315 pts
    @timk

    This is probably exactly the same thing. As i mentioned in my initial post, the divs don’t all get the id “customdiv”, the id is made up from the elements name in Lectora. So if the element is called “mydiv1” that will be the id. If you copy it, there’ll be another div with the same id. If you rename the copy you’ll be fine.

    Tim

     

    #314203 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Tim, what I’m saying is that I think there is an error in your example. There is no conflict of names in any of the code as long as you provide unique ID’s in the DIV’s you create.  Look at the sample I posted. I believe in your example you assigned an ID of “myid” to 2 DIV’s. Try naming them differently and you should be fine.

    #314390 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    315 pts
    @timk

    Hi Darrel,

    thank you very much for the example. In my title, there are only two divs: the “Custom Div” (the Lectora element) itself (id = “customdiv”) and the div I’ve inserted in the custom div (id = “myId”), so no two divs with the same id.

    The issue I wanted to mention is (just), that Lectora is not following its usual way of using the html name for the id of the “HTML Extension (Type: Custom Div)”. In your example the issue is not occuring because you renamed the two elements to “myDiv_1” and “myDiv_2”, but it would have happened if you had left the default name “Custom Div”. Normally the ids of your Custom divs should be “other47” and “other53” (their html names). Now i just mentioned that the last update brought a different default naming for HTML extensions, that includes numbering. They still use the elements name instead of the html name for the id, but at least the names are unique by default.

    Tim

    #314399 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Thanks for your patience and for clarifying further; I can be a little dense.. Unlike regular HTML authoring, I rarely copy and paste elements in Lectora. That sometimes gave unexpected results in ToolBook, the prior application I used to employ for e-learning authoring. I suppose the rule of thumb for custom DIV’s should be don’t copy and paste them and make sure you provide each an ID. You also touched on one of the original points I was making. You mentioned that the naming convention changed with the last update. That could be problematic for reusing scripts and style sheets.

    Darrel

    #322182 Score: 0
    Profile photo of chrystalb
    chrystalb
    Member
    beginner
    intermediate
    wise owl
    curious george
    @chrystalb

    I agree on all points. I have run across a situation before where the published file wrapped an object in a div, but then in another release it was a span (or vice versa, can’t remember which), but would break any jquery or css that targeted that way. I’d also add it would be great to not have any additional css styling on external html divs …the clipping mask that was added was kind of a pain.

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.